Fix icc profile application

This commit is contained in:
Solomon Peachy 2017-05-25 21:28:18 -04:00
parent bc746d25e8
commit 03679f4bb4
1 changed files with 2 additions and 2 deletions

View File

@ -156,12 +156,12 @@ function photo_print_single($database, $single) {
# sharpen as needed
$cmdline .= " -unsharp ". escapeshellarg("0x". $printer['sharpen_sigma'] ."+". $printer['sharpen_amount'] ."+". $printer['sharpen_threshold']) . " ";
# Apply color correction
# Apply color correction ## XXX what about files with embedded profiles?
if (isset($printer['icc_profile']) &&
strlen($printer['icc_profile'])) {
$iccname = "im/" . $printer['icc_profile'];
if (is_file($iccname)) {
$cmdline .= " -profile ". escapeshellarg($iccname) . " +profile * ";
$cmdline .= " +profile icm -profile " . escapeshellarg("im/sRGB.icm") . " -profile ". escapeshellarg($iccname) . " +profile icm ";
}
}