My version is ImageMagick 7.0.8-10 Q16 x64 2018-08-14 being used on Windows 8.1 x64
First question is a curiosity, since I figured out a workaround, maybe. (Perhaps the workaround is giving me problems).
http://www.imagemagick.org/Usage/thumbnails/#square
This page let me see this code that I like
Code: Select all
convert thumbnail.gif -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' \
xc:none +swap -gravity center -composite square_internal_2.gif
I instead used the longer form code given above it, and that worked.
Code: Select all
convert thumbnail.gif -set option:distort:viewport \
"%[fx:min(w,h)]x%[fx:min(w,h)]+%[fx:max((w-h)/2,0)]+%[fx:max((h-w)/2,0)]" \
-filter point -distort SRT 0 +repage square_internal.gif
Second question, how do I batch name?
I've found stuff like this, including old forum posts, that say I could do something to the effect of
Code: Select all
convert *.gif -set option:distort:viewport \
"%[fx:min(w,h)]x%[fx:min(w,h)]+%[fx:max((w-h)/2,0)]+%[fx:max((h-w)/2,0)]" \
-filter point -distort SRT 0 +repage square_internal_%[filename:f].gif
So, how can I just process all the images in the directory but prefix their name?
The closest I can get so far is "square_internal_1.gif" "square_internal_2.gif" etc, losing the original file names.