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?
Transparent tiff turns to gray when cropping
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Transparent tiff turns to gray when cropping
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.
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
Re: Transparent tiff turns to gray when cropping
The new version did the trick, thanks a lot!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.