From: garvinhicking Date: Wed, 29 Mar 2006 13:31:02 +0000 (+0000) Subject: Fix imagepng() for PHP 5.1.x X-Git-Tag: 1.0~65 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fae0803062b70c8fb0ed3a0152993f856c59f85e;p=s9y.git Fix imagepng() for PHP 5.1.x --- diff --git a/docs/NEWS b/docs/NEWS index a27a6dc..e359b9b 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -1,12 +1,18 @@ # $Id$ -Version 1.0-beta2 (March 13th, 2006) +Version 1.0 () ------------------------------------------------------------------------ + * Fix imagepng() function call for PHP 5.1.0 versions + (Sebastian Mordziol) + * Fix WYSIWYG javascript referencing so that plugins can access their objects (like emoticonchooser). Also replace with and with . (Jay Bertrandt) +Version 1.0-beta2 (March 13th, 2006) +------------------------------------------------------------------------ + * Fixed chief-editor not being able to create editors (garvinhicking) * Added turkish language by Ahmet Usal diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index 7ee1177..3aa5bd5 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -903,6 +903,7 @@ function serendipity_functions_gd($infilename) { case 'gif': $func['load'] = 'imagecreatefromgif'; $func['save'] = 'imagegif'; + $func['qual'] = 100; break; case 'jpeg': @@ -910,11 +911,13 @@ function serendipity_functions_gd($infilename) { case 'jfif': $func['load'] = 'imagecreatefromjpeg'; $func['save'] = 'imagejpeg'; + $func['qual'] = 100; break; case 'png': $func['load'] = 'imagecreatefrompng'; $func['save'] = 'imagepng'; + $func['qual'] = 9; break; default: @@ -957,7 +960,7 @@ function serendipity_rotate_image_gd($infilename, $outfilename, $degrees) $in = $func['load']($infilename); $out = imagerotate($in, $degrees, 0); - $func['save']($out, $outfilename); + $func['save']($out, $outfilename, $func['qual']); $newwidth = imagesx($out); $newheight = imagesy($out); @@ -1005,7 +1008,7 @@ function serendipity_resize_image_gd($infilename, $outfilename, $newwidth, $newh } imagecopyresampled($out, $in, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); - $func['save']($out, $outfilename, 100); + $func['save']($out, $outfilename, $func['qual']); $out = null; $in = null;