-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for optimisation error on grayscale
Thanks to Aaron Boxer for reporting this issue
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mm2 this seems to be the cause of a relatively important regression (see https://bugs.archlinux.org/task/73580 ) are you planning a 2.13.1 release?
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small note: the bug this patch fixes seems to be cause of the issue.
(Also, I'm the reporter of that issue, in case there's any other useful information I can provide).
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, sorry terrible wording on my side, this fixes the bug, not cause it
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonasmalacofilho @albert-astals-cid-kdab
Hi, thanks for reporting. I have checked the code base and this issue has been there since 2.10, (June-2020), so it is not so critical at all. I will try to reschedule 2.14 to be in 4 months or so, but doing a release now would introduce a lot of noise for something that has passed unnoticed 2 years. Thanks again.
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mm2, I see your point. However, it was specifically the update from 2.12 to 2.13 that triggered the symptoms with evince and cups + Epson ESC/P-R. Maybe something else in 2.10–2.12 was masking the problem?
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue can be easely reproduced by using the tificc utility, I used:
tificc -c1 -i"*gray22" input.tif output.tif
Being "input.tif" a TIFF file holding a monochrome image. -c1 means use the default optimisation. Pixels with 255 got wrong color.
It is certainly possible the bug was hidden by others. Or maybe the test image didn't have 255 at all. This is the only value affected.
A quick workaround is to use cmsFLAGS_NOOPTIMIZE when input is grayscale. Otherwise you can also apply the patch.
For me is very difficult to generate a new revision. The building scripts and banners does not use the revision field in major.minor.revision so generating a new release now would be a real mess. I would like also to add test cases in testbed covering this issue and check for different profile types.
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed explanation.
I'm not familiar with how PostScript and PDF store the paper/background color. But the same files worked on 2.12 but and got a gray background on 2.13 (one of them is on linked Arch bug).
Yes, I've manually patched my system, and Arch Linux now has a patched package as well. Patching Little CMS was more convenient for me than going over individual applications that were showing problems, but it's good to know of an alternative workaround.
I completely understand : )
Thanks again!
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref. a bug report from Gentoo: https://bugs.gentoo.org/832520
fdbfb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arusekk @jonasmalacofilho @albert-astals-cid-kdab
Fine. I have created a minor revision lcms2-2.13.1 with just that fix, a version number bump in the lcms2.h header and a note in the ChangeLog. Hope that would solve the issue.
In order to minimize changes all tools, DLL and so remains with 2.13 (with no info about which revision)