Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Creating watermark on uploaded images --- PLS help
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kiwi




PostPosted: 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
Sponsor
sponsor
beard0




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: