LoadFileCMYKArray method (ILEADRasterIO)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short LoadFileCMYKArray(BSTR bstrFileName, long nBitsPerPixel, long lPage);

Overview

Refer to Handling CMYK Files as Separate Bitmaps

Remarks

Loads CMYK TIFF files as CMYK files and avoids the color space conversion to RGB.

This method will fail if the page being loaded is not TIFF CMYK. However, not all pages in the file have to be CMYK, just the page being loaded.

All the bitmaps in the array must have the same width, height, bits per pixel and palette.

If the data does not have to be loaded as CMYK, use one of the regular load functions: the LoadResize method, the Load method, the LoadOffset method, or the LoadMemory method.

To convert the CMYK array to a regular BGR bitmap and use the other functions, or to save to a file format other than TIFF CMYK, use the ColorMerge method and pass COLORSEP_CMYK to the Flags parameter. If alpha information is included, use the BitmapAlpha property to set the alpha bitmap.

To load a non-CMYK file as an array of color planes, use the LoadResize method, the Load method, the LoadOffset method, or the LoadMemory method and then call the ColorSeparate method and the BitmapAlpha property.

Set the RasterIO property and the CMYKRasterCount property before loading CMYK Raster bitmaps by calling the LoadFileCMYKArray method.

This method will update the following property:

CMYKRaster property

You can use the LoadIFD property to designate the beginning of the file. . The lPage parameter of the LoadFileCMYKArray method designates the page relative to the virtual beginning of the file. The virtual beginning of the file is:

image\sqrblit.gif the real beginning of the file, if the LoadIFD property is not set

or

image\sqrblit.gif the page indicated by LoadIFD, if the LoadIFD property is set.

To paint a CMYK raster list, pass a valid RasterIO object to the RasterIO property and pass TRUE to the EnablePaintCMYKArray property.

Call the SaveFileCMYKArray method to save this array as a CMYK TIFF file.

Note that if you pass 5 raster bitmaps to the LoadFileCMYKArray method and the file does not have alpha information, the 5th bitmap in the array will not be allocated.

Image processing can be performed on each individual bitmap in the array, thereby processing each color plane separately.

Support for 16-bit grayscale images is only available in the Document/Medical Imaging editions.

See Also

Elements:

CMYKRaster property, CMYKRasterCount property, SaveFileCMYKArray method, RasterIO property, EnablePaintCMYKArray property

Topics

Raster Images: Loading Files