adrianTNT Posted November 24, 2007 Share Posted November 24, 2007 Hello. I am trying to put watermarks on images on-the-fly by a php script, in general this is done by merging two images , the source and a watermark (usually PNG with transparency). The problem is ... I cannot get the right combination (jpg/png, 8/16 bits, indexed color/RGB color) in order for the watermark to appear with smooth edges over the source image, the watermark always appears eider with white opaque background or when it is transparent it has rough edges. Any advices? Thank you. Quote Link to comment Share on other sites More sharing options...
kernelgpf Posted November 24, 2007 Share Posted November 24, 2007 I've had problems with PNG with similar scripts- I suggest switching to .gif, if possible. Quote Link to comment Share on other sites More sharing options...
adrianTNT Posted November 24, 2007 Author Share Posted November 24, 2007 I thought there are some simple predefined image functions for this, after some searching I found a script that gets a bit complicated, it is done by getting the average color of each pixel between the two images (image vs watermark) and then merge them in order to create a smooth combination between them. It works OK: http://www.devshed.com/c/a/PHP/Dynamic-Watermarking-with-PHP/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.