Bug 686749 - incorrect white point handling
Summary: incorrect white point handling
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 7.04
Hardware: PC Windows XP
: P2 minor
Assignee: Dan Coby
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2003-02-26 06:30 UTC by Felix Pahl
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
example with unusual white point in a CalGray color space (142.92 KB, application/pdf)
2003-02-26 06:35 UTC, Felix Pahl
Details
example with unusual white point in a CalRGB color space (90.09 KB, application/pdf)
2003-02-26 06:36 UTC, Felix Pahl
Details
example with unusual white point in a Lab color space (65.38 KB, application/pdf)
2003-02-26 06:37 UTC, Felix Pahl
Details
CalGray patch (990 bytes, patch)
2003-05-13 22:09 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Pahl 2003-02-26 06:30:11 UTC
Modifying a PDF file by specifying an unusual white point (e.g. [.4 1 .4])
in a CalGray, CalRGB or Lab color space makes colors come out completely
wrong in Ghostview, whereas in Acrobat Reader nothing changes. I believe
this is due to white point scaling; in my own PDF color handling code,
everything looks like it does in Acrobat when I scale all XYZ values by
the white point, so that white = (1,1,1). For CalGray and Lab spaces, this
means omitting the multiplication by the white point required in the
PDF spec. For CalRGB, it means scaling the rows of the matrix by the
white point components.
I have sample files to demonstrate the problem, but I don't know how
to submit them here.
Comment 1 Felix Pahl 2003-02-26 06:35:48 UTC
Created attachment 13 [details]
example with unusual white point in a CalGray color space
Comment 2 Felix Pahl 2003-02-26 06:36:37 UTC
Created attachment 14 [details]
example with unusual white point in a CalRGB color space
Comment 3 Felix Pahl 2003-02-26 06:37:34 UTC
Created attachment 15 [details]
example with unusual white point in a Lab color space
Comment 4 Felix Pahl 2003-02-26 06:45:45 UTC
I now found a related bug:
http://bugs.ghostscript.com/show_bug.cgi?id=650802
This may well be the same problem. I couldn't find
the sample file mentioned in that bug report (presumably
because the bug it was attached to has been closed),
but I think the sample files I've uploaded demonstrate
the problem more drastically due to the unusual white
points.
Comment 5 Jack Moffitt 2003-02-27 09:55:48 UTC
Assigning to Dan.
Comment 6 Jeong Kim 2003-05-09 01:50:27 UTC
In the case of CalRGB and Lab color space, the bug is fixed.
I can reproduce all the problems with gs7.00 but,
with the current cvs head, only CalGray makes incorrect output
while CalRGB and Lab make good output.


Comment 7 Alex Cherepanov 2003-05-13 22:07:09 UTC
The fix is very simple. We just need to follow PDF spec and
use correct MatrixA in the CIEBasedA color space derived from
CalGray. The patch is attached.
Comment 8 Alex Cherepanov 2003-05-13 22:09:11 UTC
Created attachment 139 [details]
CalGray patch
Comment 9 Alex Cherepanov 2003-05-14 06:38:26 UTC
The patch is committed to HEAD branch.