BuffaloHelp

Watermark Your Image With Simple Php Script found it on the net

Recommended Posts

You need to add this line to the top of your PHP file, to tell the browser to treat the output as an image:

header("Content-type: image/jpeg");

You can also change jpeg to another image type, if you generate a different image type.

Share this post


Link to post
Share on other sites

You need to add this line to the top of your PHP file, to tell the browser to treat the output as an image:

header("Content-type: image/jpeg");

You can also change jpeg to another image type, if you generate a different image type.


Thank you very much!

Share this post


Link to post
Share on other sites

Overwrite image

Watermark Your Image With Simple Php Script

 

Hi guys, I'm new to PHP. I have this problem on overwriting the image after watermarking the image from the user directory.

 

I'm not sure is it this part that will overwrite the image or to other directory (imagejpeg($image,$target,$quality);).

But I tried this, it doesn't work.

 

Lot of help...

Cyrus

Share this post


Link to post
Share on other sites

How to copy uploading image to our website

Watermark Your Image With Simple Php Script

 

I have successfully make watermark and resize image,

But how to copy image thats has we make watermark to our website?

 

-reply by nababan

Share this post


Link to post
Share on other sites

Doesn

Watermark Your Image With Simple Php Script

 

If everytime someone accesses an image needing watermark it requires the server to process 2 images together on every request. Wouldn't it be better to place that script in a folder of unwatermarked images and it can read each image and move it to the watermarked directory, so it only has to process the watermark code once for each image instead of thousands of times.

 

I am incorporating the watermark specific code into an photo gallery admin section where a user uploads a photo, it resizes it to the max allowed size, then resizes it again to produce a thumbnail version and then applies the watermark to the first resized image.

 

-reply by Justin Anderson

Share this post


Link to post
Share on other sites
I need a script that adds text based watermark to downloaded imageWatermark Your Image With Simple Php Script

Hello

many thanks for people who post useful code on this board and educate us on how to do things.

I am a photographer and I need a php script to run on my web site to stamp user id or mail address of my visitors/members when they download my photos.

The watermark source will be text only stating that "This picture was downloaded by (visitors e mail address _ here) from (my site name_here ) "

I wish also that this info could be squeezed somewhere in the exif field of the original jpeg photo that can come up upon examination generated on the fly when the file is being packaged with the watermark prior to download starts.

Think of it as a similar script like the rapidshare or megaupload download script that masks the actual location of the image on the server so the picture can not be accessed or discovered by a possible google spidered direct link.

My motivation on doing this is simply to discourage lamers who re-upload my material and give away for free on bbs and forums without credit where it is due. I want to make it a bit more difficult for them and easier to track them down from the exif.

Does anyone have written any code to do this? or have any idea on how to code this

I know some php but I am totally nul as far as coding graphics

thanks

Share this post


Link to post
Share on other sites
Not supporting watermark through hosting serverWatermark Your Image With Simple Php Scripthi

For our site, presently it has pre compiled ffmpeg file for converting to flv video file. But it does not support water mark on video for existing hosting server. If it has to support water mark then we have to support ffmpeg library. It should have in our site server's. Aready we have made request to hosting server for supporting ffmpeg library, Even though they are saying that  'We do not have ffmpeg installed, but you are free to upload a pre-compiled Linux binary to their home directory and reference it in their code from there."'

please solve the problem if anybody

-reply by ratnakarraju

Share this post


Link to post
Share on other sites
can this apply on blogger posts?Watermark Your Image With Simple Php Script

hi! I would like to use this for my image posts in blogger. What script should I use and where should I place it? thanks!

-question by ambi dextrous

Share this post


Link to post
Share on other sites

I implemented this script within 10 minutes and had it working on our client's image gallery. 500+ professional photographs are now all watermarked within the website.

Thanks!

Quick-tip: I am using a lightbox framework for images, so I had to edit the href= property of the a tag. Before I would have something like this:<a href="photos/full/<?php echo $gallery; ?>/<?php echo $filename; ?>"><img src="photos/thumb/...Now I am calling them like so:<a href="watermark.php?path=<?php echo $gallery; ?>/<?php echo $filename; ?>"><img src="photos/thumb/...And within watermark.php, I edited the first line to read:$imagesource =  'photogallery/full/' . $_GET['path'];

This eliminates the entire full-size URL from displaying in the status bar when hovering a link, which helps reduce the lieklihood of hotlinking or direct image viewing, ie. typing in the full image path into the browser to bypass the watermarking.

Thanks again!
Edited by moderator

Share this post


Link to post
Share on other sites

helloo..may I ask you?I need help to solve my problem..when I add a watermark (PNG) to PNG image, why the background changed black.actually, the PNG image has transparent background..there's someone can help me?Thx..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now