Loads CMYK TIFF or JPEG streams as CMYK and avoids the colorspace conversion to RGB.
public Leadtools.RasterImage LoadCmykPlanes(
Stream stream,
int bitsPerPixel,
int pageNumber
)
Public Overloads Function LoadCmykPlanes( _
ByVal stream As Stream, _
ByVal bitsPerPixel As Integer, _
ByVal pageNumber As Integer _
) As Leadtools.RasterImage
public Leadtools.RasterImage LoadCmykPlanes(
Stream stream,
int bitsPerPixel,
int pageNumber
)
- (nullable LTRasterImage *)loadCmykPlanesFromStream:(LTLeadStream *)stream
bitsPerPixel:(NSInteger)bitsPerPixel
pageNumber:(NSInteger)pageNumber
error:(NSError **)error
public RasterImage loadCmykPlanes(ILeadStream stream, int bitsPerPixel, int pageNumber)
function Leadtools.Codecs.RasterCodecs.LoadCmykPlanes(Stream,Int32,Int32)(
stream ,
bitsPerPixel ,
pageNumber
)
public:
Leadtools.RasterImage^ LoadCmykPlanes(
Stream^ stream,
int bitsPerPixel,
int pageNumber
)
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.
bitsPerPixel
Resulting image pixel depth. Possible values are:
Value | Meaning |
---|---|
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. |
pageNumber
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.
If the data does not have to be loaded as CMYK, use Load or LoadAsync.
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 should 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, it will be stored in the 5th page of the returned image.
Use RasterImagePainter.PaintCmykPlanes to display the array and SaveCmykPlanes to save an image as a CMYK TIFF or JPEG file.
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.
If you want to load a non-CMYK file as an array of color plane, use the normal Load or LoadAsync methods and then use ColorSeparateCommand and RasterImage.CreateAlphaImage method.
Refer to LoadCmykPlanes.
Products |
Support |
Feedback: LoadCmykPlanes(Stream,Int32,Int32) Method - Leadtools.Codecs |
Introduction |
Help Version 19.0.2017.6.16
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.