LEADTOOLS Image File Support (Leadtools.Codecs assembly)

LoadCmykPlanes(Stream,Int32,Int32) Method

Show in webframe







A System.IO.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:
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.
1-based index of the page from which the planes should be loaded.
Loads CMYK TIFF streams as CMYK and avoids the colorspace conversion to RGB.
Syntax
public RasterImage LoadCmykPlanes( 
   Stream stream,
   int bitsPerPixel,
   int page
)
'Declaration
 
Public Overloads Function LoadCmykPlanes( _
   ByVal stream As Stream, _
   ByVal bitsPerPixel As Integer, _
   ByVal page As Integer _
) As RasterImage
'Usage
 
Dim instance As RasterCodecs
Dim stream As Stream
Dim bitsPerPixel As Integer
Dim page As Integer
Dim value As RasterImage
 
value = instance.LoadCmykPlanes(stream, bitsPerPixel, page)
public RasterImage LoadCmykPlanes( 
   Stream stream,
   int bitsPerPixel,
   int page
)
-(LTRasterImage*)loadCmykPlanes:(LTLeadStream*)stream
                   bitsPerPixel:(unsigned int)bitsPerPixel
                     pageNumber:(unsigned int)pageNumber
                          error:(NSError**)outError;
            
public RasterImage loadCmykPlanes(ILeadStream stream, int bitsPerPixel, int pageNumber)
 function Leadtools.Codecs.RasterCodecs.LoadCmykPlanes(Stream,Int32,Int32)( 
   stream ,
   bitsPerPixel ,
   page 
)
public:
RasterImage^ LoadCmykPlanes( 
   Stream^ stream,
   int bitsPerPixel,
   int page
) 

Parameters

stream
A System.IO.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.
page
1-based index of the page from which the planes should be loaded.

Return Value

A Leadtools.RasterImage that this method loads. The image will contain one page for each of the CMYK planes.
Remarks

If the data does not have to be loaded as CMYK, use Load(String) or LoadAsync(String,LeadRect,Int32,CodecsLoadByteOrder,Int32,Int32,Object).

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 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 SaveCmykArray to save an image as a CMYK TIFF 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(String) or LoadAsync(String,LeadRect,Int32,CodecsLoadByteOrder,Int32,Int32,Object) methods and then use ColorSeparateCommand and RasterImage.CreateAlphaImage method.

Example
Refer to LoadCmykPlanes(String,Int32,Int32).
Requirements

Target Platforms

See Also

Reference

RasterCodecs Class
RasterCodecs Members
Overload List
Handling CMYK Files as Separate Images

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.