Page 1 of 1
transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-06-12T06:01:43-07:00
by thodberg
If I create 2 files hat.tif and lady.tif with transparency in photoshop and
then use these commands in ImageMagick version 6.4.1:
convert hat.tif newhat.tif
convert lady.tif newlady.tif
then the tranparency is disappeared from these files
and the maks used to create tranparency is now appearing
as an extra channel in photoshops channels palette.
In hat.tif and lady.tif the transparency mask was not present
in channels palette
the test files is found here:
http://dejo.dk/Members/estro/hat.tif
http://dejo.dk/Members/estro/lady.tif
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-06-12T11:16:35-07:00
by magick
We're getting proper transparency using ImageMagick 6.4.1-6, the current release, however there is memory corruption for lady.tif. It has 6 samples per pixels and we only allocated 5. The problem is fixed in ImageMagick 6.4.1-7 Beta, available sometime tomorrow.
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-06-13T02:13:03-07:00
by thodberg
First: I have used ImageMagick 6.4.1-6 for Windows for my test.
Second: To reproduce the problem it is neasasearry to open the images in Photoshop
before and after these commands are used:
convert hat.tif newhat.tif
convert lady.tif newlady.tif
and compare the look of the channel palette and layer palette
between hat.tif and newhat.tif
and between lady.tif and newlady.tif
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-06-13T07:13:24-07:00
by magick
Ok, easy fix. We need to propagate the extra samples type, in this case associated alpha.
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-06-16T07:25:06-07:00
by thodberg
On this adress you will find screendumps from photoshop:
http://javabog.dk/filer/transparens/
hat_in_layer.jpg is the look of the layers palette in photoshop
As you can see there is two layers, a transparent layer and a
white background layer.
Compare this to newhat_layer.jpg, where there is only one layer
with no transparency. In other words the two original layers have
been flattened into one layer.
hat_in_channel.jpg is the look of the channel palette in photoshop.
As you can see there is 3 channels R, G and B.
Compare this to newhat_channel.jpg, which is the look of the
channel palette, where an extra channel have appeared, that is
similar to the shape of the transparent part of the original image.
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-07-01T07:00:28-07:00
by thodberg
The problem have been fixed in version 6.4.2
thanks!
Thodberg
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-07-15T07:18:03-07:00
by thodberg
Under some circonstances, namelig when an image is created (not converted) from IM it is still a problem to maintain transparency:
If this command is done:
convert logo: -transparent "#FFFFFF" x628.tif
then the background #FFFFFF should be tranparent, but in PhotoShop it is still shown as an extra channel (called 'Alpha 1') and no transparency is there.
Please see
http://javabog.dk/filer/transparens/im- ... toshop.jpg
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-07-15T07:24:13-07:00
by magick
Transparency is there, notice the 'extra samples' tag:
> tiffinfo x628.tif
TIFF Directory at offset 0x25cc0 (154816)
Image Width: 640 Image Length: 480
Resolution: 72, 72 (unitless)
Bits/Sample: 8
Compression Scheme: LZW
Photometric Interpretation: RGB color
Extra Samples: 1<unassoc-alpha>
FillOrder: msb-to-lsb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 4
Rows/Strip: 3
Planar Configuration: single image plane
DocumentName: x628.tif
Software: ImageMagick 6.4.2 07/15/08 Q16 OpenMP
http://www.imagemagick.org
Predictor: horizontal differencing 2 (0x2)
We tried a number of programs and they all could recognize the transparency. Photoshop apparently does not follow the TIFF standard. If you can determine the TIFF incantation that Photoshop requires, let us know.
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-07-15T09:04:43-07:00
by thodberg
We have tried a some other Adobe products as well and they also cant recognize the transparency as well.
This is a big show-stopper for us.
Could we pay you to get you to look at this?
Also, could you elaborate what you mean by "We need to propagate the extra samples type, in this case associated alpha." and why you can't just do the same when creating an image from scratch when it works when changing a PhotoShop TIFF file?
odd transparency behavior in 6.4.2
Posted: 2008-07-15T15:11:26-07:00
by dognose
If I change the fill color to red, the background is transparent and the text is red.
If I change the fill color to white, the background is black and the text is transparent!
convert -size 150x150 xc:none -fill "white" -pointsize 50 -draw "text 10,125 'text'" text.gif
convert --version
Version: ImageMagick 6.4.2 07/08/08 Q16 OpenMP
http://www.imagemagick.org
edit: im built from srpm on centos x86_64
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-07-15T15:15:51-07:00
by magick
We're using 6.4.2-3:
and a white on transparent image is created as expected.
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-07-18T13:33:30-07:00
by jn0101
magick, please please clarify what you meant by the
'Ok, easy fix. We need to propagate the extra samples type, in this case associated alpha.'
and how to do this also on new images.
What code did you change? What attributes (og whatever?) was too much/missing in the TIFF image to make it Adobe compatible.
Thanks!
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-08-12T02:59:52-07:00
by shaun
Hi, i'm having a similar problem, but unfortunatley it's continuing with 6.4.2
I have a psd file with a single layer (no background layer) and transparent. When i convert this file to a tiff, the transparancy becomes black like described in the oriinal post, and the transparancy information is saved in an alpha channel when looking in photoshop. the layer is described in photoshop as being a background layer. when using photoshop to do this (save as tif), i'm getting a tif file with no background layer and a single layer with transparancy (as expected).
to replicate the situation, take the hat.tif file, remove background layer and save as a psd, use convert newhat.psd newhatout.tif and the background should be black and the only layer present should be indicated as a background layer.
Re: transparency is disappearing in ImageMagick vers. 6.4.1
Posted: 2008-08-12T07:05:42-07:00
by jn0101
I repeat my question:
jn0101 wrote:magick, please please clarify what you meant by the
'Ok, easy fix. We need to propagate the extra samples type, in this case associated alpha.'
and how to do this also on new images.
What code did you change? What attributes (og whatever?) was too much/missing in the TIFF image to make it Adobe compatible.
Thanks!
I suppose you are referring to the line
Extra Samples: 1<unassoc-alpha>
of output of tiffinfo?
As we really really need a way to tell Adobe products about transparent layers - whether Photoshop apparently does follow the TIFF standard or not - I ask you could you please explain a little more about it and perhaps point to the lines of code you changed so we can get someone paid to look into this.
Thank you very much!