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
https://forums.phpfreaks.com/topic/78693-solved-smoother-watermark-on-images-how/
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/

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.