Bug 689811 - Custom Color Callbacks not working with banding
Summary: Custom Color Callbacks not working with banding
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Color (show other bugs)
Version: master
Hardware: PC Linux
: P2 normal
Assignee: Michael Vrhel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 13:48 UTC by Ralph Giles
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 330
Word Size: ---


Attachments
updated-ccolor-862.diff (32.68 KB, patch)
2008-04-30 13:53 UTC, Ralph Giles
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2008-04-30 13:48:02 UTC
After compiling Ghostscript with ENABLE_CUSTOM_COLOR_CALLBACK = 1 (gsnamecl.h)
and OBJECT_TYPE_EXAMPLE = 1 (gsncdummy.c) The following commandline generates
output tinted by object type, showing that the custom color callbacks are being
called:

debugobj/gs -sDEVICE=tiff32nc -dBufferSpace=100000000 -o test-300.tiff -r300 -c
"<< /CustomColorCallback 32 string .pantonecallback >> setsystemparams" -f
../tests_private/comparefiles/Altona_Visual_bb_1v1_x3.pdf

However, running the same command at 400 dpi:

debugobj/gs -sDEVICE=tiff32nc -dBufferSpace=100000000 -o test-400.tiff -r400 -c
"<< /CustomColorCallback 32 string .pantonecallback >> setsystemparams" -f
../tests_private/comparefiles/Altona_Visual_bb_1v1_x3.pdf

Does not show the object tint on the images, indicating that the custom color
callbacks are not invoked in the same cases. The first command doesn't band (as
shown by -ZL) while the second does.
Comment 1 Ralph Giles 2008-04-30 13:53:02 UTC
Created attachment 3974 [details]
updated-ccolor-862.diff

The problem also occurs with the 8.62 release after applying this patch. In
this case, adding -dMaxBitmap=150000000 allows the 400 dpi run to render the
same as the 300 dpi run, confirming this is a banding interaction.

However, changing MaxBitmap doesn't appear to help with HEAD.

The patch includes the changes that went into HEAD at r8679 along with some
additional code to disable image interpolation when a custom color callback is
active.
Comment 2 Henry Stiles 2008-04-30 16:54:34 UTC
> However, changing MaxBitmap doesn't appear to help with HEAD.


Setting MaxBitmap works for me. 

Further analysis shows the problem only occurs with high level images
(gxclimag.c).  Vectors, text and images decomposed to rectangles seem to work.
Comment 3 Michael Vrhel 2008-05-21 11:39:24 UTC
Fix was committed with rev 8764.

This was a simple fix which puts the callback structure address into gslib_ctx
instead of in the graphic state. This fixes the customer's issue. The
postscript interface for custom color remains as it was with this commit. Soon,
in the future, we will be changing to a C API interface. There does remain an
issue related to object type tagging.  If high level images occur with banding,
the object type is different than if there was no banding.  Opening a new bug
related to this.