Page 1 of 1

Transparent tiff turns to gray when cropping

Posted: 2014-10-11T03:45:13-07:00
by MoreK
I just started to test ImageMagick in my Linux system, what a wonderful tool!

I'm having problem with -crop function. It's probably just that I can't use the tool properly, but maybe someone can help.

I'm clipping a larger transparent tif image to smaller png images, using this command:
convert radar.tif -crop 400x400+0+0 clip.png

All works great, but not with the first clip (from x-0 y-0 coordinate). The clip turns entirerly gray and looses transparency. This particular section seem to be fully transparent (no data). I'm not sure but maybe that causes the issue?

Here's the image in question: http://koti.kapsi.fi/~morek/shared/radar/radar.tif

Any ideas how to make the clip transparent?

Re: Transparent tiff turns to gray when cropping

Posted: 2014-10-11T04:30:06-07:00
by snibgo
Your command on your image gives me an cropped image that is mostly (but not quite entirely) transparent. Some pixels towards the bottom-right are not quite transparent.

This is with IM v6.8.9-5. If your version is old (before 6.8.2), I suggest you update it.

Re: Transparent tiff turns to gray when cropping

Posted: 2014-10-11T06:10:17-07:00
by MoreK
snibgo wrote:Your command on your image gives me an cropped image that is mostly (but not quite entirely) transparent. Some pixels towards the bottom-right are not quite transparent.

This is with IM v6.8.9-5. If your version is old (before 6.8.2), I suggest you update it.
The new version did the trick, thanks a lot!