asmith Posted January 9, 2008 Share Posted January 9, 2008 the function ImageCreateFromJPEG or ImageCreateFromGIF or ImageCreateFromPNG , all decrease the quality of the image. what should do to have the highest quality? Link to comment https://forums.phpfreaks.com/topic/85157-imagecreatefrom/ Share on other sites More sharing options...
asmith Posted January 9, 2008 Author Share Posted January 9, 2008 *BUMP* (this function decrease my images quality !!! grrr) Link to comment https://forums.phpfreaks.com/topic/85157-imagecreatefrom/#findComment-434594 Share on other sites More sharing options...
The Little Guy Posted January 9, 2008 Share Posted January 9, 2008 for jpg and png images you can do this: <?php imagejpeg($sourceImg, NULL, 100); // Souce, File location (Unless NULL), Quality in percent imagepng($sourceImg, NULL, 100); // Souce, File location (Unless NULL), Quality in percent ?> gif images you can't control quality Link to comment https://forums.phpfreaks.com/topic/85157-imagecreatefrom/#findComment-434642 Share on other sites More sharing options...
asmith Posted January 9, 2008 Author Share Posted January 9, 2008 imagecreatefromjpeg use for captcha background . you can set image for a captcha background instead of solid colors (createimagetruecolors) but when you use bacground it reduce the image quality !! but i see some captcha everywhere they are perfect in quality , don't know why this function doen't work ! please help ! Link to comment https://forums.phpfreaks.com/topic/85157-imagecreatefrom/#findComment-434718 Share on other sites More sharing options...
The Little Guy Posted January 9, 2008 Share Posted January 9, 2008 lets see the code... OR... http://phpsnips.com/snippet.php?id=43 Link to comment https://forums.phpfreaks.com/topic/85157-imagecreatefrom/#findComment-434733 Share on other sites More sharing options...
asmith Posted January 9, 2008 Author Share Posted January 9, 2008 $image = imagecreatefromJPEG("image.jpg"); // set colors $white = ImageColorAllocate($image, 255, 255, 255); $black = ImageColorAllocate($image, 0, 0, 0); imagettftext($image, 50, 0, 70, 140, $black, 'arial.TTF', $the_code); // created image imagejpeg($image); imagedestroy($image); the first line reduces the image quality Link to comment https://forums.phpfreaks.com/topic/85157-imagecreatefrom/#findComment-434748 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.