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
convert -crop ... fails on png files
Re: convert -crop ... fails on png files
To fix the problem you reported, use this command to reset the virtual canvas of your image:
- convert 20080331091752540734_mx.png +repage -crop 3988x572+0+0 20080331091752540734_bo.png
-
janilrau
Re: convert -crop ... fails on png files
ok, thanks a lot I'll try this, but I don't understand the difference in positioning the image on a virtula canvas between PNG and JPG.
Does it mean, that my JPG code (that works fine) is wrong?
Does it mean, that my JPG code (that works fine) is wrong?
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 13 guests