Resize and rotate images in a folder based on the EXIF \u200b\u200borientation
Package ImageMagick offers several command-line tools for working with images.
$ sudo apt-get install imagemagick
with the following bash script of (jpegto800) saved in a simple text file I resized the images in the folder:
# / bin / bash
for img in *. jpg do
convert-geometry 800x600! $ Img $ img w800_
done using the pico editor I created the script and I made it executable with chmod
$ pico jpegto800
$ chmod + x $ jpegto800
./jpegto800
now with another tool I update the rotation
$ sudo apt-get install
$ *. jpg jhead-autorotate
Even if the website where I'll upload does not support EXIF \u200b\u200b rotating images will be oriented correctly.
0 comments:
Post a Comment