# Example:
#
# <form action="foo.php" enctype="multipart/form-data" method="post">
-# <input type="hidden" name="MAX_FILE_SIZE" value="2097152" />
-# <input type="file" name="photo" />
-# <input type="submit" name="save" value="Save" />
+# <input type="hidden" name="MAX_FILE_SIZE" value="2097152">
+# <input type="file" name="photo">
+# <input type="submit" name="save" value="Save">
# </form>
#
# #######
# the client's name appended. Otherwise $path will be used as the filename
# exactly as is, even if extensions differ between the client's name and $path.
#
-# where user uploads "c:\foo\Bar baz.PDF" at <input name="in" type="file" />
+# where user uploads "c:\foo\Bar baz.PDF" at <input name="in" type="file">
# save_uploaded_file('in', 'uploaded_pdfs/'); yeilds:
# "uploaded_pdfs/bar_baz.pdf"
# save_uploaded_file('in', 'uploaded_pdfs/prefix.'); yeilds:
$new_filename .= '.png';
}
- imagemagick_convert($filename, $new_filename, "$convert -colorspace RGB", 'GIF to PNG conversion');
+ imagemagick_convert($filename, $new_filename, "-colorspace sRGB", 'GIF to PNG conversion');
unlink($filename);
return $new_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.
#
$filename = $path;
}
- $convert_params = '-colorspace RGB';
+ $convert_params = '-colorspace sRGB -auto-orient';
if($image_width > 0 && $image_height > 0) {
$convert_params .= " -geometry ${image_width}x$image_height";
}