Loads CMYK TIFF or JPEG streams as CMYK and avoids the colorspace conversion to RGB.
Public Overloads Function LoadCmykPlanes( _
ByVal stream As Stream, _
ByVal bitsPerPixel As Integer, _
ByVal pageNumber As Integer _
) As RasterImage
- (nullable LTRasterImage *)loadCmykPlanesFromStream:(LTLeadStream *)stream
A Stream containing the data of the image file to load. The image data must be CMYK; otherwise, the method will fail and throw an exception.
Resulting image pixel depth. Possible values are:
|0||Each plane will have the same bits/pixel as the source file (8 or 16).|
|8||Each plane will be a grayscale 8 bits per pixel image.|
|16||Each plane will be a grayscale 16 bits per pixel image. This is not available for saving JPEG CMYK files.|
1-based index of the page from which the planes should be loaded.
A RasterImage that this method loads. The image will contain one page for each of the CMYK planes.
Support for 16-bit grayscale images is only available in the Document/Medical Imaging editions.
This method will fail if the input file is not TIFF or JPEG CMYK. Note that not all the pages have to be CMYK - it is enough if only the page that you wish to load is CMYK.
Only the following memory load options are supported by this method:
This method uses the values of RasterCodecs.Options.Tiff.Load.ImageFileDirectoryOffset.
If the image being loaded contains alpha channel information, the alpha channel(s) will be loaded as well. First alpha channel will be stored as page 5, second alpha as plane 6, etc.
If you want to convert the CMYK array to a regular BGR image and use the other methods or save to a file format other than TIFF CMYK, use ColorMergeCommand and set the ColorMergeCommand.Type to ColorMergeCommandType.Cmyk.
If you have an alpha image, use RasterImage.SetAlphaImage to set the alpha image.
You can apply image processing on each individual image. This allows you to process each color plane separately.
Refer to LoadCmykPlanes.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries