note 114937 added to function.imagepalettetotruecolor

From: Date: Wed, 30 Apr 2014 14:44:22 +0000
Subject: note 114937 added to function.imagepalettetotruecolor
Groups: php.notes 
Request: Send a blank email to php-notes+get-199377@lists.php.net to get a copy of this message
PHP ver 5.4.24 does not support this function (it has not been defined). To get rid of this, you must copy image resource to new image created by function imagecreatetruecolor(); Example with image loaded from GIF file: $image = imagecreatefromgif("path/to/gif/file.gif"); //create an image from GIF $width = imagesx($image); //get width of source image $height = imagesy($image); //get height of source image $image2 = imagecreatetruecolor($width,$height); //create new image of true colors with given width and height imagecopy($image2,$image,0,0,0,0,$width,$height); //copy source image to new one header("Content-Type: image/jpeg"); //set header for JPG image imagejpg($image2); //render JPg image into browser imagedestroy($image); //free up memory imagedestroy($image2); ---- Server IP: 89.187.142.233 Probable Submitter: 90.177.79.194 ---- Manual Page -- http://php.net/manual/en/function.imagepalettetotruecolor.php Edit -- https://master.php.net/note/edit/114937 Del: integrated -- https://master.php.net/note/delete/114937/integrated Del: useless -- https://master.php.net/note/delete/114937/useless Del: bad code -- https://master.php.net/note/delete/114937/bad+code Del: spam -- https://master.php.net/note/delete/114937/spam Del: non-english -- https://master.php.net/note/delete/114937/non-english Del: in docs -- https://master.php.net/note/delete/114937/in+docs Del: other reasons-- https://master.php.net/note/delete/114937 Reject -- https://master.php.net/note/reject/114937 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199377) next »