Jump to content

[SOLVED] Smoother watermark on images, how ?


adrianTNT

Recommended Posts

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.

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.