diff options
| author | Simon Tatham <anakin@pobox.com> | 2016-04-24 07:30:20 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2016-04-24 07:30:20 +0100 |
| commit | 6a8a53e7235a8621313b792b498ebb43452f9e38 (patch) | |
| tree | 594e298cb1ac0338aceed8be2f1e315f6306b9c2 | |
| parent | 02ce237f911f7b970ea9b093226a9e7d09fffbf4 (diff) | |
| download | puzzles-6a8a53e7235a8621313b792b498ebb43452f9e38.zip puzzles-6a8a53e7235a8621313b792b498ebb43452f9e38.tar.gz puzzles-6a8a53e7235a8621313b792b498ebb43452f9e38.tar.bz2 puzzles-6a8a53e7235a8621313b792b498ebb43452f9e38.tar.xz | |
Explicitly set RGB colourspace in icon.pl's use of convert.
This is that annoying feature of up-to-date 'convert' in which
converting to or from a PNG file defaults to returning RGB values that
have been 'helpfully' gamma-corrected (or some such) from the exact
data stored in the source file to some nonsense you didn't want.
Usually the worst this causes is slightly washed-out looking graphics,
but in this case, since my entire aim was to squash the image into a
specific set of exact RGB values so as to turn it into a paletted
Windows icon file, it caused an actual build failure when the next
loop in icon.pl couldn't find the gamma-corrected values in its
expected palette map, and no wonder.
| -rwxr-xr-x | icons/icon.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/icons/icon.pl b/icons/icon.pl index d0c5a8e..fcb1aa3 100755 --- a/icons/icon.pl +++ b/icons/icon.pl @@ -127,7 +127,7 @@ sub readicon { # point, to avoid having to do it ourselves (.BMP and hence # .ICO are bottom-up). my $data = []; - open IDATA, "convert -flip -depth 8 $filename rgba:- |"; + open IDATA, "convert -set colorspace sRGB -flip -depth 8 $filename rgba:- |"; push @$data, $rgb while (read IDATA,$rgb,4,0) == 4; close IDATA; # Check we have the right amount of data. |