Revised fix for 687418 WTS does not work with bitcmyk driver
"Dan Coby" <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
Revised fix for 687418 WTS does not work with bitcmyk driver. DETAILS: The changes in this revised fix are pretty extensive. Note: This patch includes several items from Russell Lang. I am including these since they are required for the proper execution of the patch and it does not seem reasonable to require possible testers or reviewers to have to track down and install these patches separately. The list of changes includes: 1. Added logic to check_device_separable to also set the gray_index value. This suggestion came from Russell Lang. 2. Add verification that a colorants bits are consecutive. (from Russell Lang in: http://www.ghostscript.com/pipermail/gs-code-review/2004-May/004501.html 3. Changes to gx_default_encode_color and gx_default_decode_color to use position and bit count info from the device's color_info data. (Also from Russell Lang in the previously mentioned submission.) 4. Included test routines. (Also from Russell Lang in the previously mentioned submission.) 5. Added calls to check_device_separable prior to calls to the various 'fill_in_procs' routines (gx_device_fill_in_procs, gx_forward_fill_in_procs, fill_in_procs). The fill_in_procs routines use the separable information in choosing default routines for the encode_color and decode_color routines. Thus we have a chicken and egg problem since check_device_separable also uses the device's encode_color routine. The test routines from Russell were a great help in debugging Also various changes that were found while testing this patch: 6. The various color deskjet drivers (gdevcdj.c) was incorrectly setting the dither_grays and dither_colors values to 5 instead of 256. (I have no idea why.) The max_gray and max_color values were set to being set correctly to 255. 7. The color deskjet devices (gdevcdj.c) were doing BG and UCR removal inside of the encode_color routines. These devices use the default color_mapping_procs which also do these tasks. The code in the encode_color_routine was removed since it could cause conflicts with the overprint routines. The code in the encode_color routine was also using a fixed BG/UCR logic (from PS level 2). 8. Corrected a problem in the color desk jet decode_color routine which was always returning zero for the black value. 9. Changed the casting for values assigned to the std_colorant_names field. Note: MSVC and gcc complain about different conditions. There does not seem to be a combination that will keep both happy. This set produces no complaints from gcc. 10. Corrected the setting of dither_grays and dither_colors for the devicen device. Previously this was being set to 1 when it should have been set to 256. Found by Russell Lang. 11. Modified check_device_separable to only check for appropriate values of the max_gray/dither_grays and max_color/dither_colors pairs only for gray/color devices. 12. Added check for encode_color routines which encode zero bits for a colorant. Previously this condition would have caused an infinitely in check_device_separable. Change suggested by Russell Lang. 13. Removed a previous call to set_linear_color_bits_mask_shift in gx_default_fill_in_procs. This has been logically replaced by the calls to check_device_separable which have been added. 14. Corrected a problem in the ppm_map_rgb_color in gdevpbm.c. This routine was calling gx_default_encode_color which requires 15. Corrected problem in pcx256 device which incorrectly setting the dither_grays and dither_colors values. 16. Removed the check_process_color_names routine from gdevpsd.c since it not used. 17. Modified the dci_alpha_values macro in gxdevcli.h. This macro was setting some devices as 'separable' but was not setting the related color_info fields (comp_shift, comp_bits, comp_mask). Now this macro sets a devices as 'unknown'. The check_device_separable routine will change this for devices which are separable. Devices which want to change their process color model need to either set themselves as 'unknown' and let check_device_separable handle things or else the device needs to setup its own values for separable fields. Note: There is another related submission from Russell Lang that is not included in this patch. This consists of changes to the display device for making it 'separable'. This change is needed for Igor's linear shading work. http://www.ghostscript.com/pipermail/gs-code-review/2004-May/004500.html Dan _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
687418.dif
(video/x-dv, 38 KB) - not displayed