[bug-gs] Incorrect rendering for type 1 images when Interpolate ==true

Dan Coby dan.coby at artifex.com
Mon Nov 10 14:26:10 PST 2003


Zoltan,

Would you please be more specific about where the split of the color_index
value is occurring?
Which routine in which source file?
Can you send an example test file?


Dan


-----Original Message-----
From: bug-gs-bounces at ghostscript.com
[mailto:bug-gs-bounces at ghostscript.com]On Behalf Of BÍRÓ Zoltán
Sent: Saturday, November 08, 2003 4:31 PM
To: bug-gs at ghostscript.com
Cc: gs-devel at ghostscript.com
Subject: [bug-gs] Incorrect rendering for type 1 images when Interpolate
==true


I've found a special case (bug?) when gs does perform computations (byte
splitting) with the gx_color_index value obtained from encode_color() driver
procedure, resulting in incorrect rendering.

Assume that the following conditions are satisfied:
-- Ghostscript has been compiled with GX_COLOR_INDEX_TYPE="unsigned __int64"
for win32;
-- the device has neither high level nor pixel level graphical procedures
implemented, except fill_rectangle();
-- the driver's color_info.depth is greater than 32 bits.

In this case gs renders incorrectly all of the type 1 images whith
Interpolate == true.
More specifically, instead of calling a fill_rectangle() for each
(interpolated) sample as expected, gs 'splits' the appropriate
(color_info.depth sized) color value in bytes, than calls fill_rectangle()
functions for each byte-sized slice from the color value.
Example: instead of
fill_rectangle(0, 0, 8, 1, 0x9876543210);
the following sequence is called:
fill_rectangle(0, 0, 1, 1, 0x98);
fill_rectangle(0, 0, 1, 1, 0x76);
fill_rectangle(0, 0, 1, 1, 0x54);
fill_rectangle(0, 0, 1, 1, 0x32);
fill_rectangle(0, 0, 1, 1, 0x10);

Since almost all of the color drivers works on 24 or 32 bits it's hardly
surprising that nobody knocked up against this problem before.  I've tested
this issue just on my driver of 4*12 bit depth (which hasn't been included
in gs yet) so -- unfortunately -- I cannot give sample source code to
reproduce the bug.
Please don't hesitate to contact me for further informations if necessary.

Best regards,
Zoltan BIRO


_______________________________________________
bug-gs mailing list
bug-gs at ghostscript.com
http://www.ghostscript.com/mailman/listinfo/bug-gs



More information about the bug-gs mailing list