mrjameer Posted May 1, 2007 Share Posted May 1, 2007 hi when i run the following script for watermarking on windows it is working well but when i run the same script on linux server it is not working.please correct me where iam wrong. <?php function addTextToFile($infile, $outfile) { $image = imagecreatefromjpeg($infile); $font_size = 12; $color = imagecolorallocate($image, 205,205,255); $black =imagecolorallocate($image, 0,0,0); ImageTTFText ($image, $font_size, 0, 01, 10, $black, "ARIALBD.TTF","www.ap.com"); ImageTTFText ($image, $font_size, 0, 00, 9, $color, "ARIALBD.TTF","www.ap.com"); imagejpeg($image, $outfile, 100); // save to outfile imagedestroy($image); } $newfile="back_test.jpg"; $newfile1="back.jpg"; addTextToFile($newfile, $newfile1) ?> php on windows php 4.3.6 gd 2.0.22 php on linux php 4.4.4 gd 2.0.28 thanks mrjameer Link to comment https://forums.phpfreaks.com/topic/49479-watermarking-not-working-on-linux-server/ Share on other sites More sharing options...
Wildbug Posted May 1, 2007 Share Posted May 1, 2007 Without knowing what errors you're getting or what isn't working, I might suggest that you confirm the case of the filenames with which you are working. If the font files ("ARIALBD.TTF", etc) are lowercase in the Linux system ("arialbd.ttf",etc), that will probably cause problems. Link to comment https://forums.phpfreaks.com/topic/49479-watermarking-not-working-on-linux-server/#findComment-242540 Share on other sites More sharing options...
mrjameer Posted May 1, 2007 Author Share Posted May 1, 2007 hi iam getting just blank screen and the new image is not created. thanks mrjameer. Link to comment https://forums.phpfreaks.com/topic/49479-watermarking-not-working-on-linux-server/#findComment-242573 Share on other sites More sharing options...
Wildbug Posted May 1, 2007 Share Posted May 1, 2007 And the filenames? Link to comment https://forums.phpfreaks.com/topic/49479-watermarking-not-working-on-linux-server/#findComment-242579 Share on other sites More sharing options...
TEENFRONT Posted May 1, 2007 Share Posted May 1, 2007 Also it could be certain GD functions/libary are missing from PHP on the linux server. I could never get any thing to do with images and php to work on my old host, but now, i dont know why, but it all works etc. Link to comment https://forums.phpfreaks.com/topic/49479-watermarking-not-working-on-linux-server/#findComment-242581 Share on other sites More sharing options...
mrjameer Posted May 1, 2007 Author Share Posted May 1, 2007 hi i have changed the filename to lowercase but still not working thanks mrjameer Link to comment https://forums.phpfreaks.com/topic/49479-watermarking-not-working-on-linux-server/#findComment-242628 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.