Skip to content

Commit 4ffc599

Browse files
author
danh
committed
Changed -colorspace RGB to -colorspace sRGB - a fix for darker images with newer versions of ImageMagick
git-svn-id: http://svn.resourcespace.org/svn/resourcespace@3796 c08608d7-6e46-0410-86ca-f2a6f1370df5
1 parent 4f61601 commit 4ffc599

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

include/image_processing.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ function create_previews_using_im($ref,$thumbonly=false,$extension="jpg",$previe
889889
} else {
890890
// use existing strategy for color profiles
891891
# Preserve colour profiles? (omit for smaller sizes)
892-
$profile="+profile \"*\" -colorspace RGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
892+
$profile="+profile \"*\" -colorspace sRGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
893893
if ($imagemagick_preserve_profiles && $id!="thm" && $id!="col" && $id!="pre" && $id!="scr") {$profile="";}
894894
}
895895

include/preview_preprocessing.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@
571571
$prefix="";
572572

573573
# Preserve colour profiles?
574-
$profile="+profile icc -colorspace RGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
574+
$profile="+profile icc -colorspace sRGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
575575
if ($imagemagick_preserve_profiles) {$profile="";}
576576

577577
# CR2 files need a cr2: prefix
@@ -609,7 +609,7 @@
609609
$eps_density_x = $eps_data_x / $eps_bbox_x * 72;
610610
$eps_density_y = $eps_data_y / $eps_bbox_y * 72;
611611
$eps_target=get_resource_path($ref,true,"",false,"miff");
612-
$nfcommand = $convert_fullpath . ' -compress zip -colorspace RGB -quality 100 -density ' . sprintf("%.1f", $eps_density_x ). 'x' . sprintf("%.1f", $eps_density_y) . ' ' . escapeshellarg($file) . '[0] ' . escapeshellarg($eps_target);
612+
$nfcommand = $convert_fullpath . ' -compress zip -colorspace sRGB -quality 100 -density ' . sprintf("%.1f", $eps_density_x ). 'x' . sprintf("%.1f", $eps_density_y) . ' ' . escapeshellarg($file) . '[0] ' . escapeshellarg($eps_target);
613613
run_command($nfcommand);
614614
if (file_exists($eps_target))
615615
{

pages/ajax/contactsheet.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public function Footer() {
317317
$convert_fullpath = get_utility_path("im-convert");
318318
if ($convert_fullpath==false) {exit("Could not find ImageMagick 'convert' utility at location '$imagemagick_path'");}
319319

320-
$command = $convert_fullpath . " -resize ".$contact_sheet_preview_size." -quality 90 -colorspace RGB \"".get_temp_dir() . "/contactsheetrip.jpg\" \"".get_temp_dir() . "/contactsheet.jpg\"";
320+
$command = $convert_fullpath . " -resize ".$contact_sheet_preview_size." -quality 90 -colorspace sRGB \"".get_temp_dir() . "/contactsheetrip.jpg\" \"".get_temp_dir() . "/contactsheet.jpg\"";
321321
run_command($command);
322322
exit();
323323
}

pages/view.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ function directDownload(url)
159159
</script>";
160160
}
161161

162+
162163
# Show the header/sidebar
163164
include "../include/header.php";
164165

@@ -1099,7 +1100,8 @@ function SelectTab(tab)
10991100

11001101

11011102

1102-
<?php if ($enable_find_similar) { ?>
1103+
<?php
1104+
if ($enable_find_similar) { ?>
11031105
<!--Panel for search for similar resources-->
11041106
<div class="RecordBox">
11051107
<div class="RecordPanel">
@@ -1144,7 +1146,7 @@ function UpdateResultCount()
11441146
<div class="clearerleft"> </div>
11451147
<br />
11461148
<input name="search" type="submit" value="&nbsp;&nbsp;<?php echo $lang["searchbutton"]?>&nbsp;&nbsp;" id="dosearch"/>
1147-
<iframe src="blank.html" frameborder=0 scrolling=no width=1 height=1 style="visibility:hidden;" name="resultcount" id="resultcount"></iframe>
1149+
11481150
</form>
11491151
<div class="clearerleft"> </div>
11501152
</div>
@@ -1157,6 +1159,5 @@ function UpdateResultCount()
11571159

11581160
<?php } # end of block that requires search permissions
11591161

1160-
11611162
include "../include/footer.php";
11621163
?>

plugins/annotate/include/general.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function MultiRow($left, $right) {
224224
if (!file_exists($command)) {$command=$imagemagick_path . "/convert";}
225225
if (!file_exists($command)) {exit("Could not find ImageMagick 'convert' utility at location '$command'");}
226226

227-
$command.= " -resize $contact_sheet_preview_size -quality 90 -colorspace RGB " . escapeshellarg($jpgstoragepath) ." " . escapeshellarg($jpgstoragepath);
227+
$command.= " -resize $contact_sheet_preview_size -quality 90 -colorspace sRGB " . escapeshellarg($jpgstoragepath) ." " . escapeshellarg($jpgstoragepath);
228228
run_command($command);
229229
return true;
230230
}

0 commit comments

Comments
 (0)