Welcome to WebmasterWorld Guest from 107.20.122.81

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

image quality problem

     

nick patrick

12:47 am on Jan 21, 2009 (gmt 0)

5+ Year Member



hi i am doing a watermark on my images using this

header('Content-Type: image/jpeg');
$im = imagecreatefromjpeg("IMAGE URL FULL WITH [...");...]
$red = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 255, 255, 255);
$font_file = 'arial.ttf';
imagefttext($im, 20, 0, 25, 25, $red, $font_file, 'WHAT EVER');
imagejpeg($im);
imagedestroy($im);

I AM DOING WITH THIS and after that when i checked the script so its works fine but the image quality is going to low just a bit is there any way to get it same as original image ?

i am doing this with the full image url because i worked with mod rewrite and the images are coming from my sql

nick patrick

1:10 am on Jan 21, 2009 (gmt 0)

5+ Year Member



again i got the answer my self here the solution for others
adding this 'null, 100' in imagejpeg will work
null because there is no name ;)
imagejpeg($im, null, 100);

100 is quality %

 

Featured Threads

Hot Threads This Week

Hot Threads This Month