Bug 691477 - Differences in tiff24nc and tiff32nc output
Summary: Differences in tiff24nc and tiff32nc output
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Color (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 01:37 UTC by Marcos H. Woehrmann
Modified: 2023-05-17 13:46 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
screenshot.png (75.62 KB, image/png)
2010-07-19 01:37 UTC, Marcos H. Woehrmann
Details
acrobat_rgb_Page_3.tiff (86.20 KB, image/tiff)
2010-07-19 01:38 UTC, Marcos H. Woehrmann
Details
acrobat_cmyk_Page_3.tiff (143.73 KB, image/tiff)
2010-07-19 01:38 UTC, Marcos H. Woehrmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2010-07-19 01:37:23 UTC
Created attachment 6506 [details]
screenshot.png

Converting the file 29-07A.PS (found in tests_private/ps/ps3cet/) with head (r11519) to a 32 bit cmyk format (tiff32nc) results in a very different image on page 3 than converting to a 24 bit rgb format (tiff24nc), see attached screenshot.

This is somewhat of a progression, since before the icc_work branch merge the differences were even more pronounced (all of the gradient bars which contained any color were rendered entirely black).

Example command line2:

  bin/gs -sDEVICE=tiff24nc -o test24.tif ./29-07A.PS
  bin/gs -sDEVICE=tiff32nc -o test32.tif ./29-07A.PS

Opening the file in Adobe Acrobat 9.3.3 and saving as an RGB or CMYK TIFF results in the same image, which is an hybrid of Ghostscript output.  The first 6 bands on page 3 match Ghostscript RGB output and the final 4 bands match Ghostscript CMYK output, see attached files.
Comment 1 Marcos H. Woehrmann 2010-07-19 01:38:05 UTC
Created attachment 6507 [details]
acrobat_rgb_Page_3.tiff
Comment 2 Marcos H. Woehrmann 2010-07-19 01:38:25 UTC
Created attachment 6508 [details]
acrobat_cmyk_Page_3.tiff
Comment 3 Michael Vrhel 2011-11-04 05:20:09 UTC
Something is getting mixed up with respect to the color space when we get to the third page.  If I set first and last page to 3, the CMYK output is fine.
Comment 4 Ken Sharp 2023-05-17 13:46:33 UTC
After some consideration, and checking the current output against another PostScript interpreter, I do not believe there is a problem here. The output can be expected to be different depending on the device colour space, because the transfer function is applied in device space.

So if (as per the test) we define a colour image in, say, RGB it will be converted to the device space, say CMYK, before the transfer function is applied to it.

Also, after 12 years if there was a real problem here I think it would have been clear before.

Acrobat isn't really a good comparison here, we don't have sufficient control over the rendering to duplicate the PostScript result.