gsiparm4.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved.
  2. This software is provided AS-IS with no warranty, either express or
  3. implied.
  4. This software is distributed under license and may not be copied,
  5. modified or distributed except as expressly authorized under the terms
  6. of the license contained in the file LICENSE in this distribution.
  7. For more information about licensing, please refer to
  8. http://www.ghostscript.com/licensing/. For information on
  9. commercial licensing, go to http://www.artifex.com/licensing/ or
  10. contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  12. */
  13. /* $Id: gsiparm4.h,v 1.5 2002/06/16 08:45:42 lpd Exp $ */
  14. /* ImageType 4 image parameter definition */
  15. #ifndef gsiparm4_INCLUDED
  16. # define gsiparm4_INCLUDED
  17. #include "gsiparam.h"
  18. /*
  19. * See Section 4.3 of the Adobe PostScript Version 3010 Supplement
  20. * for a definition of ImageType 4 images.
  21. */
  22. typedef struct gs_image4_s {
  23. gs_pixel_image_common;
  24. /*
  25. * If MaskColor_is_range is false, the first N elements of
  26. * MaskColor are sample values; if MaskColor_is_range is true,
  27. * the first 2*N elements are ranges of sample values.
  28. *
  29. * Currently, the largest sample values supported by the library are 12
  30. * bits, but eventually we want to support DevicePixel images with
  31. * samples up to 32 bits as well.
  32. */
  33. bool MaskColor_is_range;
  34. uint MaskColor[GS_IMAGE_MAX_COMPONENTS * 2];
  35. } gs_image4_t;
  36. #define private_st_gs_image4() /* in gximage4.c */\
  37. extern_st(st_gs_pixel_image);\
  38. gs_private_st_suffix_add0(st_gs_image4, gs_image4_t, "gs_image4_t",\
  39. image4_enum_ptrs, image4_reloc_ptrs, st_gs_pixel_image)
  40. /*
  41. * Initialize an ImageType 4 image. Defaults:
  42. * MaskColor_is_range = false
  43. */
  44. void gs_image4_t_init(gs_image4_t * pim, const gs_color_space * color_space);
  45. #endif /* gsiparm4_INCLUDED */