note 33821 deleted from function.imagecreatefromjpeg by cmb
| From: | cmb@php.net | Date: | Sun, 11 Dec 2016 11:16:22 +0000 |
| Subject: | note 33821 deleted from function.imagecreatefromjpeg by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208505@lists.php.net to get a copy of this message | ||
Note Submitter: office at 4point-webdesign dot com
----
Here's the answer for your 256 color only problem!!!
use these functions in order then it works fine!
$img_src=imagecreatefromjpeg('yoursource.jpg');
$img_dst=imagecreatetruecolor(20,20);
imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, 20, 20, 20, 20);
imagejpeg($img_dst, $g_dstfile, 100);
imagedestroy($img_dst);
Greetz, GTB