note 124610 added to function.imageinterlace

From: Date: Tue, 14 Jan 2020 08:54:39 +0000
Subject: note 124610 added to function.imageinterlace
Groups: php.notes 
Request: Send a blank email to php-notes+get-213876@lists.php.net to get a copy of this message
this function really saved my day !!! well for testing i should upload several jpg some had jfif encoding , so some are color losing when i include them in fpdf ,tcpdf (i tryed 2 open sources to minimize errors to know wht's wrong) . the thumb function i used now (fixed) is public static function jpgtofilethumb($file,$thumb,$lun,$quality){ //de la php.net list ($x, $y) = @getimagesize ($file); $img = @imagecreatefromjpeg ($file); if ($x > $y) { $tx = $lun; $ty = round($lun / $x * $y); } else { $tx = round($lun / $y * $x); $ty = $lun; } $thb = imagecreatetruecolor ($tx, $ty); // Enable interlancing if(imageistruecolor($thb)) imageinterlace($thb, true); imagecopyresampled ($thb,$img, 0,0, 0,0, $tx,$ty, $x,$y); imagejpeg ($thb, $thumb, $quality); imagedestroy ($thb); imagedestroy ($img); } ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.168 (proxied: 82.137.9.133) ---- Manual Page -- http://php.net/manual/en/function.imageinterlace.php Edit -- https://master.php.net/note/edit/124610 Del: integrated -- https://master.php.net/note/delete/124610/integrated Del: useless -- https://master.php.net/note/delete/124610/useless Del: bad code -- https://master.php.net/note/delete/124610/bad+code Del: spam -- https://master.php.net/note/delete/124610/spam Del: non-english -- https://master.php.net/note/delete/124610/non-english Del: in docs -- https://master.php.net/note/delete/124610/in+docs Del: other reasons-- https://master.php.net/note/delete/124610 Reject -- https://master.php.net/note/reject/124610 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#213876) next »