ImageMagick -auto-level from xclip output
by Sima86 from LinuxQuestions.org on (#6MF2W)
Greetings,
iam currently working on a project that processes images from a gallery.
Iam using a Raspberry Pi to clip a certain image url.
The image is usualy a bit too dark, so i would like to use
convert a.jpeg -auto-level a.jpeg (replaces the original image)
My second command takes the output of xclip (url) and downloads the file
sudo wget -A jpeg -O /home/pi/upload/a.jpeg $(xclip -o)
I want to combine both commands into one,
problem is, the image is generated when wget writes it.
so could i do something like this:
convert $(wget -A jpeg -O /home/pi/upload/a.jpeg $(xclip -o)) -auto-level /home/pi/upload/a.jpeg
?
my whole script currently looks like this
Quote:
for reference, the convert -auto-level command https://imagemagick.org/script/comma...php#auto-level
iam currently working on a project that processes images from a gallery.
Iam using a Raspberry Pi to clip a certain image url.
The image is usualy a bit too dark, so i would like to use
convert a.jpeg -auto-level a.jpeg (replaces the original image)
My second command takes the output of xclip (url) and downloads the file
sudo wget -A jpeg -O /home/pi/upload/a.jpeg $(xclip -o)
I want to combine both commands into one,
problem is, the image is generated when wget writes it.
so could i do something like this:
convert $(wget -A jpeg -O /home/pi/upload/a.jpeg $(xclip -o)) -auto-level /home/pi/upload/a.jpeg
?
my whole script currently looks like this
Quote:
#!/bin/bash while true do image=/home/pi/Desktop/a.jpeg upath=/home/pi/upload/ wget -A jpeg -O $image $(xclip -o) convert $image -auto-level $image sudo mv $image $upath sleep 120 done |