Traces of previous resolution after applying crop to an image

0

I'm cropping an image with

convert input.png -crop 380x270+50+0 output.png

However much to my surprise the image still "remembers" about its previous resolution:

$ identify output.png
output.png PNG 380x270 480x270+50+0 8-bit sRGB 63.2KB 0.000u 0:00.000

This is transparent to image viewers, until I wanted to make a gif out of cropped images:

$ convert output*.png output.gif
$ identify output.gif
output.gif[359] GIF 380x270 480x270+50+0 8-bit sRGB 64c 8.987MB 0.020u 0:00.019

-- in the resulting gif file the "borders" are seen in my image viewer.

I guess I did the crop incompletely. What do I miss?

Adobe

Posted 2017-05-08T20:22:43.093

Reputation: 1 883

Answers

0

Using that answer I achieved the crop I wanted with:

$ convert frame????.png -gravity East -chop 50x0 -gravity West -chop 50x0 out/frame%04d.png
$ cd out
$ identify frame0000.png
frame0000.png PNG 380x270 380x270+0+0 8-bit sRGB 63.2KB 0.000u 0:00.000

To merge resulting pngs to gif do:

# make 24 FPS gif (100/24 = 4.16):
convert -delay 4.16 frame????.png animation.gif

Adobe

Posted 2017-05-08T20:22:43.093

Reputation: 1 883