Bug 691444

Summary: Image much darker after icc_work merge
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: ColorAssignee: Michael Vrhel <michael.vrhel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: master   
Hardware: PC   
OS: All   
Customer: Word Size: ---
Attachments: screenshot.png
AR9_B-12-3077-1831-7-001.tiff

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