Fix for instances with old GraphicsMagick or ImageMagick versions (no -auto-orient).

This commit is contained in:
Michael Foster
2013-08-03 22:14:25 -04:00
parent 486eccba2e
commit ac4306555b
5 changed files with 97 additions and 13 deletions

View File

@@ -504,7 +504,7 @@
// Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
// placement of "%s" and "%d".
$config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s';
$config['convert_args'] = '-size %dx%djjj %s -thumbnail %dx%d -auto-orient +profile "*" %s';
// Strip EXIF metadata from JPEG files.
$config['strip_exif'] = false;
@@ -522,6 +522,11 @@
// this basically does the same thing as $config['redraw_image']. (If $config['redraw_image'] is enabled,
// this value doesn't matter as $config['redraw_image'] attempts to correct orientation too.)
$config['convert_auto_orient'] = false;
// Is your version of ImageMagick or GraphicsMagick old? Older versions may not include the -auto-orient
// switch. This is a manual replacement for that switch. This is independent from the above switch;
// -auto-orrient is applied when thumbnailing too.
$config['convert_manual_orient'] = false;
// Regular expression to check for an XSS exploit with IE 6 and 7. To disable, set to false.
// Details: https://github.com/savetheinternet/Tinyboard/issues/20