Page 1 of 1
Composite + -watermark messing up PNG overlay
Posted: 2007-05-26T07:27:38-07:00
by Ryan Nutt
I'm using the composite command to overlay a watermark onto images during upload on a script of mine. But if I include the -watermark x% flag in the command line it makes the image look like the one that's attached. If watermark is left out then the overlay works fine.
Is there a setting I'm missing? Or does IM have problems with transparent PNGs and watermarking? This is the first time I've had anyone comment on this not working correctly, and I know it's worked before so it may be something with the watermark file but I'd still like to know what I can do to fix it.
Re: Composite + -watermark messing up PNG overlay
Posted: 2007-06-01T05:54:35-07:00
by Ryan Nutt
I now have two users reporting this problem. One has version 6.2.4, as do I on one of my development server and both are showing this problem. I don't know yet what version the other problem server is running.
Re: Composite + -watermark messing up PNG overlay
Posted: 2007-06-04T20:22:15-07:00
by anthony
the -watermark option, was actually never much good at watermarking!
See IM Examples, Annotating Images, Watermarking for a number of methods..
http://www.imagemagick.org/Usage/annota ... mark_image
Re: Composite + -watermark messing up PNG overlay
Posted: 2007-06-05T15:27:39-07:00
by Ryan Nutt
Thanks Anthony, but using the dissolve is actually worse.
What I've done is added the option to use a GIF file as the watermark and it seems to work pretty well.
What doesn't make sense to me is that it's only certain PNG files that are causing problems, so I think it's more dependent on the file rather than IM. What I may wind up doing is using GD for the watermark command because it doesn't seem to have the same problem with the files my users have sent me but use IM for everything else because it generally does a better job.
Re: Composite + -watermark messing up PNG overlay
Posted: 2007-06-05T17:50:54-07:00
by anthony
Dissolve is just an overlay, with additional transparency.
What command do you use with GD. I'll look at exactly what it does to implement its watermark feature.
Re: Composite + -watermark messing up PNG overlay
Posted: 2007-06-05T18:12:07-07:00
by Ryan Nutt
It's got to be something about the way the PNG is saved out of Photoshop.
Now GD is causing problems too not letting me change the opacity. imagecopymerge seems to be the function that does what I need, but with the same PNG that's causing problems with IM imagecopymerge is just overlaying a solid white box in the size of the watermark file.
imagecopy will work, but it won't change the opacity.
Does Photoshop have issues in how it saves PNG files? I suppose I need to go and research why the PNG might have gotten screwed up out of Photoshop. My client sent me the source PSD and it looks fine in Photoshop, but opened in Irfanview the PSD just shows a white box as does the PNG that I saved from Photoshop.