From 1b1aafb7d72ba773a23f2fedc1c89cedf192f4d3 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Wed, 21 Aug 2013 20:02:25 -0400 Subject: [PATCH] USE sRGB COLORSPACE WITH IMAGEMAGIC --- upload.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upload.php b/upload.php index b1b3323..7940526 100644 --- a/upload.php +++ b/upload.php @@ -224,7 +224,7 @@ function gif_to_png($filename, $new_filename = 'just change extension') { $new_filename .= '.png'; } - imagemagick_convert($filename, $new_filename, "$convert -colorspace RGB", 'GIF to PNG conversion'); + imagemagick_convert($filename, $new_filename, "$convert -colorspace sRGB", 'GIF to PNG conversion'); unlink($filename); return $new_filename; @@ -331,7 +331,7 @@ function image_w_h_or_die($filename) { # Like save_uploaded_file() (above) except that it converts all images to PNG -# or JPEG, converts to RGB colorspace, and optionally scales and/or creates a +# or JPEG, converts to sRGB colorspace, and optionally scales and/or creates a # thumbnail. And, if $path ends with a period, the correct extension will be # appended. # @@ -392,7 +392,7 @@ function convert_uploaded_image($key, $path, $image_width = 0, $image_height = 0 $filename = $path; } - $convert_params = '-colorspace RGB -auto-orient'; + $convert_params = '-colorspace sRGB -auto-orient'; if($image_width > 0 && $image_height > 0) { $convert_params .= " -geometry ${image_width}x$image_height"; } -- 1.7.10.4