I am looking for a way to batch process images in bash.
Is there any way to fill up specific part of image?
Example:
I want to fill up the red part with white color. The red part is always on the top left corner, size is 135x35px.
Yes, Gimp/Photoshop is one way to do this, but I have lot of images and I love automatize things with bash.
Sure, use ImageMagick - installed on most Linux distros and available for OSX and Windows.
convert input.png -fill white -draw "rectangle 0,0 135,35" result.png
If you have many files, make a COPY in a spare folder and try this and it will probably do them all
mogrify -fill white -draw "rectangle 0,0 135,35" *.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With