Hello,
this bug appeared on a production server with Image Magick 6.4.
When I tried to test it on my computer with version 6.5.9-10 (2010-02-21), it was successful
Then I downloaded version 6.8.6-8 (2013-08-04 Q16) and it failed.
Here is the problem
I simply type
convert image.tif -resize 200x200 image.jpg
My picture is a watch.
With 6.4 and 6.8, the dial is missing on the transformed image
note : If I type convert image.tif image.jpg .. nothing is missing
With 6.5, my watch is perfectly resized.
any idea ? I can provide the file
thank you
Added on 08/27/2013:
I have opened Photoshop and I have discovered that there were paths AND masks.
I have removed all masks => the conversion works perfectly.
I have removed all paths => the conversion still fails
Conclusion, it's a masking issue, so I have renamed the title
the file can be downloaded here : http://www.utopix.ch/_z3c_/watch-mask.tif
thank you for your help
Masking Path problem with some IM versions
Masking Path problem with some IM versions
Last edited by samfra on 2013-08-27T03:37:41-07:00, edited 1 time in total.
Re: Clipping Path problem with some IM versions
here is the file http://www.utopix.ch/_z3c_/watch-mask.tifsnibgo wrote:Provide the file.
I simple resize it :
convert watch-mask.tif -resize 200x200 output.jpg
I need to be able to handle such files (the programm must be generic)
thank you
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Masking Path problem with some IM versions
You should ignore the alpha.
You might also want to convert it to sRGB, and strip all the non-image elements:
Code: Select all
convert watch-mask.tif -alpha off -resize 200x200 output.jpg
Code: Select all
convert watch-mask.tif -alpha off -colorspace sRGB -resize 200x200 -strip output.jpg
snibgo's IM pages: im.snibgo.com
Re: Masking Path problem with some IM versions
Hello,
first, thank you very much for your help, I appreciate.
It solves my problem with this kind of pictures.
But my web application must be able to handle all kinds of pictures.
How could I know if I have to add "-alpha off" for a picture and not for a simple file where I'd like to keep the transparency.
(If it's not possible dynamically, which limit could I give to my customers ?)
Is there no way to do only a kind of "-mask off" ?
(in my example, I converted to jpg, but in fact, if I find some alpha channels, I convert to png).
thank you,
Sam
first, thank you very much for your help, I appreciate.
It solves my problem with this kind of pictures.
But my web application must be able to handle all kinds of pictures.
How could I know if I have to add "-alpha off" for a picture and not for a simple file where I'd like to keep the transparency.
(If it's not possible dynamically, which limit could I give to my customers ?)
Is there no way to do only a kind of "-mask off" ?
(in my example, I converted to jpg, but in fact, if I find some alpha channels, I convert to png).
thank you,
Sam
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Masking Path problem with some IM versions
For some files, the alpha is important and you want to keep it. For others, like this one, you want to remove it.samfra wrote:How could I know if I have to add "-alpha off" for a picture and not for a simple file where I'd like to keep the transparency.
You need to find what chacteristic determines whether you want to keep the alphas. Perhaps all the CMYKA files should have alpha off. Or perhaps files with "mask" in the name need alpha off. Perhaps files that have detail hidden by alpha should have alpha off, but where hidden pixels have a constant color you want to keep the alpha.
EDIT: Or perhaps files with tiff:alpha:unassociated should have alpha off.
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Masking Path problem with some IM versions
Reading posts on these forums about "unassociated" makes me strongly suspect this is the difference.
Modern versions of IM can:
This returns nothing or "associated" or "unassociated". You may find that testing this, and setting "-alpha off" for "unassociated", does what you want.
In old IM versions, you need to "identify -verbose" and search for "tiff:alpha".
Modern versions of IM can:
Code: Select all
identify -quiet -format "%[tiff:alpha]" transparent.tif
In old IM versions, you need to "identify -verbose" and search for "tiff:alpha".
snibgo's IM pages: im.snibgo.com