Code: Select all
convert FILE -resize "64x" -crop "64x64+0+16" +repage -strip OUTFILE
Code: Select all
convert FILE -resize "64x" -crop "64x64+0+16" +repage -strip -resample 72 OUTFILE
Here is "identify" output for the original and post-processed file WITHOUT the resample:
Code: Select all
coneybeare $ convert "aa.jpg" -crop "64x64+0+16" +repage -strip "aa.png"
coneybeare $ for image in `find . -type f`; do identify $image; identify -verbose $image | egrep "^ Resolution"; done
./aa.jpg JPEG 1130x1695 1130x1695+0+0 8-bit DirectClass 1.492MiB 0.000u 0:00.000
Resolution: 300x300
./aa.png PNG 64x64 64x64+0+0 8-bit DirectClass 7.46KiB 0.000u 0:00.000
Resolution: 118.11x118.11
Code: Select all
coneybeare $ convert "aa.jpg" -crop "64x64+0+16" +repage -strip -resample 72 "aa.png"
coneybeare $ for image in `find . -type f`; do identify $image; identify -verbose $image | egrep "^ Resolution"; done
./aa.jpg JPEG 1130x1695 1130x1695+0+0 8-bit DirectClass 1.492MiB 0.000u 0:00.000
Resolution: 300x300
./aa.png PNG 15x15 15x15+0+0 8-bit DirectClass 901b 0.000u 0:00.000
Resolution: 28.34x28.34