Bug 691444 - Image much darker after icc_work merge
Summary: Image much darker after icc_work merge
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Color (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: Michael Vrhel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 00:51 UTC by Marcos H. Woehrmann
Modified: 2010-07-13 07:05 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
screenshot.png (4.22 KB, image/png)
2010-07-08 00:51 UTC, Marcos H. Woehrmann
Details
AR9_B-12-3077-1831-7-001.tiff (10.05 KB, application/tiff)
2010-07-08 16:53 UTC, Ray Johnston
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2010-07-08 00:51:14 UTC
Created attachment 6442 [details]
screenshot.png

Converting the file B-12-3077-1831-7-001.pdf (which can be found in tests_private/compare_files) with r11306 to a 1 bit b/w format (e.g. pbmraw) results in a very dark background; r11305 and earlier versions result in a white background, as does converting to a continuous tone format (e.g. pgmraw).  

The command line I'm using for testing:

  bin/gs -sDEVICE=pbmraw -o test.pbm ./B-12-3077-1831-7-001.pdf
Comment 1 Ray Johnston 2010-07-08 16:53:09 UTC
Created attachment 6446 [details]
AR9_B-12-3077-1831-7-001.tiff

Output from Adobe Acrobat 9 for reference (72 dpi tiffg4)
Comment 2 Michael Vrhel 2010-07-13 03:14:34 UTC
Tracked this down in the icc image interpolation code.  Output of interpolation is coming out scaled between 0 and 0x7fff and I am expecting it to be 0 and 0xffff hence the darker output.  Should have this resolved shortly.
Comment 3 Michael Vrhel 2010-07-13 05:36:15 UTC
Found that the special image downsample scaling filters for dithered devices has baked into it scaling to and from frac.  It should be paying attention to the range scaling values in stream_image_scale_state_common.  This should be easy to fix.
Comment 4 Michael Vrhel 2010-07-13 07:05:29 UTC
Fixed with rev 11505