convert -crop ... fails on png files
Posted: 2008-03-31T00:48:47-07:00
I'm experiencing serious trouble when cropping PNG images...
Here my example. The size of the image is 26,8 MB (3988 x 4288 pixel) and it is located here:
http://www.posterjack.com/kj_tmp/200803 ... 4_leri.png
and then try this (the error I got during crop operation of PNG files):
# flip image (works!)
convert 20080331091752540734_leri.png +flip 20080331091752540734_mx.png
# now crop a region
# Convert issues a warning and generates the 1 px transparent file named 20080331091752540734_bo.png, but it should crop the indicated region
convert 20080331091752540734_mx.png -crop 3988x572+0+0 20080331091752540734_bo.png
Afterwards try this (works fine, only difference: now processing JPG files):
# flip image (works!)
convert 20080331091752540734_leri.png +flip 20080331091752540734_mx.jpg
# now crop a region
# Convert cropes the region correctly
convert 20080331091752540734_mx.jpg -crop 3988x572+0+0 20080331091752540734_bo.jpg
I would prefer to process PNG due to the lossless compression/decompression. Is there a workaround for this bug?
Thanks karsten
karsten dot jursch at fleiheit dot com
Here my example. The size of the image is 26,8 MB (3988 x 4288 pixel) and it is located here:
http://www.posterjack.com/kj_tmp/200803 ... 4_leri.png
and then try this (the error I got during crop operation of PNG files):
# flip image (works!)
convert 20080331091752540734_leri.png +flip 20080331091752540734_mx.png
# now crop a region
# Convert issues a warning and generates the 1 px transparent file named 20080331091752540734_bo.png, but it should crop the indicated region
convert 20080331091752540734_mx.png -crop 3988x572+0+0 20080331091752540734_bo.png
Afterwards try this (works fine, only difference: now processing JPG files):
# flip image (works!)
convert 20080331091752540734_leri.png +flip 20080331091752540734_mx.jpg
# now crop a region
# Convert cropes the region correctly
convert 20080331091752540734_mx.jpg -crop 3988x572+0+0 20080331091752540734_bo.jpg
I would prefer to process PNG due to the lossless compression/decompression. Is there a workaround for this bug?
Thanks karsten
karsten dot jursch at fleiheit dot com