homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

image quality problem
nick patrick

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

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');

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)

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 %

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved