Composite command not maintaining transparency

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Harold Windt
Posts: 3
Joined: 2014-01-31T03:17:11-07:00
Authentication code: 6789

Composite command not maintaining transparency

Post by Harold Windt »

Composite command not maintaining transparency

Issue:- We are trying to apply watermark on an image using composite command and not getting the desired results with latest version of Imagemagick 6.8.8-2 Q16 x64

When I say desired results - The watermark image is having a transparent background, so when we apply the watermark on any image it should be overlapped on the image, but we are getting a fog kind of layer on the watermark

Command that we are using
composite -dissolve 75% -gravity northwest C:\Users\harold.w\Desktop\InputImages\WaterMarks\watermark_dis.psd[0] C:\Users\harold.w\Desktop\InputImages\Tulips.jpg C:\Users\harold.w\Desktop\Output\Final_Out_Water.jpg

The same command is working fine and producing the desired output on ImageMagick 6.8.7-4 and ImageMagick 6.5.4-7 but failing on the latest version of ImageMagick, is this a bug? Please see the screenshot below
https://www.dropbox.com/s/zwng2anhve1p3 ... g_Diff.jpg

Watermark PSD image - https://www.dropbox.com/s/uqrf9w2m26g2m ... rk_dis.psd
Image on which we trying to apply watermark - https://www.dropbox.com/s/u8iag8t551oz24j/Tulips.jpg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Composite command not maintaining transparency

Post by snibgo »

Your command works fine for me, on IM v6.8.8-0 on Windows 8.1.

Code: Select all

composite -verbose -dissolve 75% -gravity NorthWest watermark_dis.psd[0] tulips.jpg out.jpg
snibgo's IM pages: im.snibgo.com
Harold Windt
Posts: 3
Joined: 2014-01-31T03:17:11-07:00
Authentication code: 6789

Re: Composite command not maintaining transparency

Post by Harold Windt »

snibgo wrote:Your command works fine for me, on IM v6.8.8-0 on Windows 8.1.

Code: Select all

composite -verbose -dissolve 75% -gravity NorthWest watermark_dis.psd[0] tulips.jpg out.jpg
Oh !!
As I said its working on ImageMagick 6.5.4-7 & ImageMagick 6.8.7-4 with Windows7. You confirmed its working on IM v6.8.8-0 on Windows 8.1

Can we confirm if this is a bug in latest Imagemagick 6.8.8-2? If any other user can confirm, then i'll post this in "bugs" section
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Composite command not maintaining transparency

Post by fmw42 »

Your watermark PSD image has background transparency only and I suspect that IM only looks for alpha channel transparency. It can only handle one or the other and apparently only works with alpha channel transparency.

Tested with IM 6.8.8.4 Q16 Mac OSX.

So I get something like your top image, where you see 75% white background in the composite from the watermark image.

Try exporting your PSD file from PS as PNG or Tiff and try that. It seems to work fine for me that way.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Composite command not maintaining transparency

Post by dlemstra »

I can confirm this is a bug and it will be fixed in the next release of ImageMagick (6.8.8-5) I broke this when adding support for reading zip compressed layers.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Harold Windt
Posts: 3
Joined: 2014-01-31T03:17:11-07:00
Authentication code: 6789

Re: Composite command not maintaining transparency

Post by Harold Windt »

dlemstra wrote:I can confirm this is a bug and it will be fixed in the next release of ImageMagick (6.8.8-5) I broke this when adding support for reading zip compressed layers.
Thanks for confirming it's a bug and then moving the topic to "Bugs" section. When can we expect the next release i.e., ImageMagick (6.8.8-5), any expected date?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Composite command not maintaining transparency

Post by magick »

6.8.8.5 should be available this week, Sunday at the latest, likely sooner.
Post Reply