Do images cropped with Imagemagick somehow remember their old size? If so, how to avoid that?

Viewed 76

I raytraced a pile of images sized 500x500 and then removed the margin with the following command:

for i in $(seq -f "%03g" 0 359); do convert $i.png -crop 459x453+22+21 $i.png; done

Now my files (seem to) have the right size.
But when I uploade them to https://ezgif.com/maker, it creates a GIF that is still 500x500.

Right now the images are still visible on the page: https://ezgif.com/maker/ezgif-6-ee4b08f7-gif
This is the result: https://commons.wikimedia.org/wiki/File:Disdyakis_12_untruncated_to_dyakis_12.gif

Is this as weird as it seems to me, or does -crop just change the visible area, while the "actual" size is still the old one?
In my file browser it says "Width 459 pixels".


I recently used -chop for the same purpose, and had no problem:

for i in $(seq -f "%03g" 0 359); do convert $i.png -gravity South -chop 0x6 $i.png; done

https://commons.wikimedia.org/wiki/File:Dyakis_dodecahedron.gif

1 Answers

As stated by fmw42: The operator +repage is needed to really change the size.

I "cropped" my images to the size they already had and used it:

for i in $(seq -f "%03g" 0 359); do convert $i.png -crop 459x453 +repage $i.png; done

https://www.imagemagick.org/Usage/crop/#crop_repage

Related