Skip to content

Commit

Permalink
Fix colorspace issue on image conversion using ImageMagick (#1489270)…
Browse files Browse the repository at this point in the history
… - s/RGB/sRGB/
  • Loading branch information
alecpl committed Aug 3, 2013
1 parent 254af68 commit 5591a63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================

- Fix colorspace issue on image conversion using ImageMagick (#1489270)
- Fix XSS vulnerability when editing a message "as new" or draft (#1489251)
- Fix rewrite rule in .htaccess (#1489240)
- Fix detecting Turkish language in ISO-8859-9 encoding (#1489252)
Expand Down
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_image.php
Expand Up @@ -120,7 +120,7 @@ public function resize($size, $filename = null, $browser_compat = false)
$p['-opts'] = array('-resize' => $p['size'].'>');

if (in_array($type, explode(',', $p['types']))) { // Valid type?
$result = rcube::exec($convert . ' 2>&1 -flatten -auto-orient -colorspace RGB -quality {quality} {-opts} {intype}:{in} {type}:{out}', $p);
$result = rcube::exec($convert . ' 2>&1 -flatten -auto-orient -colorspace sRGB -quality {quality} {-opts} {intype}:{in} {type}:{out}', $p);
}

if ($result === '') {
Expand Down Expand Up @@ -222,7 +222,7 @@ public function convert($type, $filename = null)
$p['out'] = $filename;
$p['type'] = self::$extensions[$type];

$result = rcube::exec($convert . ' 2>&1 -colorspace RGB -quality 75 {in} {type}:{out}', $p);
$result = rcube::exec($convert . ' 2>&1 -colorspace sRGB -quality 75 {in} {type}:{out}', $p);

if ($result === '') {
@chmod($filename, 0600);
Expand Down

0 comments on commit 5591a63

Please sign in to comment.