Creating watermark on uploaded images --- PLS help
Author |
Message |
kiwi
|
Posted: Mon Sep 20, 2004 8:13 pm Post subject: Creating watermark on uploaded images --- PLS help |
|
|
Hi
I am trying to watermark all the images uploade on website. Using jpg image and watermark image is png24. I am using following code
photoImage = ImageCreateFromJPEG('photo.jpg');
ImageAlphaBlending($photoImage, true);
$logoImage = ImageCreateFromPNG('logo.png');
$logoW = ImageSX($logoImage);
$logoH = ImageSY($logoImage);
ImageCopy($photoImage, $logoImage, 0, 0, 0, 0, $logoW, $logoH);
ImageJPEG($photoImage,"newimg.jpg",75);
ImageDestroy($photoImage);
ImageDestroy($logoImage);
----
But new image is not created and ImageJPEG() return false.
Please any one can help me to identify what's the prob / what may be causing the prob ????
Thanks |
|
|
|
|
|
Sponsor Sponsor
|
|
|
beard0
|
Posted: Fri Nov 26, 2004 10:06 pm Post subject: (No subject) |
|
|
The only problem that I can see is that you don't use header("content-type: image/jpeg"). I doubt that would be generating the error message that you describe though. |
|
|
|
|
|
|
|