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

BÍRÓ Zoltán zoltan at softhome.net
Sat Nov 8 16:30:52 PST 2003


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




More information about the bug-gs mailing list