Transparent tiff turns to gray when cropping

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MoreK
Posts: 2
Joined: 2014-10-11T03:27:47-07:00
Authentication code: 6789

Transparent tiff turns to gray when cropping

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Transparent tiff turns to gray when cropping

Post 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.
snibgo's IM pages: im.snibgo.com
MoreK
Posts: 2
Joined: 2014-10-11T03:27:47-07:00
Authentication code: 6789

Re: Transparent tiff turns to gray when cropping

Post 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!
Post Reply