LEADTOOLS Image File Support (Leadtools.Codecs assembly)
LEAD Technologies, Inc

SaveCmykPlanesAsync Method






The image that contains the CMKY planes to be saved.
A Leadtools.ILeadStream that will contain the image data to save.

Specifies the output file format. Valid values are:

Resulting bits per pixel for each plane. Possible values:

Value Meaning
0 Default bits per pixel. LEADTOOLS will pick the closest valid value.
8 Save 8 bits per component. The generated file will contain 32 bits (no alpha) or 40 bits (if alpha). Note that GetInformation(String,Boolean) or GetInformationAsync(String,Boolean,Int32,Object) will report 8 bits less (24 or 32-bit).
16 Save 16 bits per component. The generated file will contain 64 bits (no alpha) or 80 bits (if alpha). Note that GetInformation(String,Boolean) or GetInformationAsync(String,Boolean,Int32,Object) will report 16 bits less (48 or 64-bit).
Specifies the reference page number when saving a multipage file.
Determines how to handle the page when saving to multipage formats.
Saves the pages of an image as a CMYK TIFF stream. .NET support WinRT support
Syntax
public IAsyncAction SaveCmykPlanesAsync( 
   RasterImage image,
   ILeadStream stream,
   RasterImageFormat format,
   int bitsPerPlane,
   int pageNumber,
   CodecsSavePageMode pageMode
)
'Declaration
 
Public Function SaveCmykPlanesAsync( _
   ByVal image As RasterImage, _
   ByVal stream As ILeadStream, _
   ByVal format As RasterImageFormat, _
   ByVal bitsPerPlane As Integer, _
   ByVal pageNumber As Integer, _
   ByVal pageMode As CodecsSavePageMode _
) As IAsyncAction
'Usage
 
Dim instance As RasterCodecs
Dim image As RasterImage
Dim stream As ILeadStream
Dim format As RasterImageFormat
Dim bitsPerPlane As Integer
Dim pageNumber As Integer
Dim pageMode As CodecsSavePageMode
Dim value As IAsyncAction
 
value = instance.SaveCmykPlanesAsync(image, stream, format, bitsPerPlane, pageNumber, pageMode)
public IAsyncAction SaveCmykPlanesAsync( 
   RasterImage image,
   ILeadStream stream,
   RasterImageFormat format,
   int bitsPerPlane,
   int pageNumber,
   CodecsSavePageMode pageMode
)
 function Leadtools.Codecs.RasterCodecs.SaveCmykPlanesAsync( 
   image ,
   stream ,
   format ,
   bitsPerPlane ,
   pageNumber ,
   pageMode 
)
public:
IAsyncAction^ SaveCmykPlanesAsync( 
   RasterImage^ image,
   ILeadStream^ stream,
   RasterImageFormat format,
   int bitsPerPlane,
   int pageNumber,
   CodecsSavePageMode pageMode
) 

Parameters

image
The image that contains the CMKY planes to be saved.
stream
A Leadtools.ILeadStream that will contain the image data to save.
format

Specifies the output file format. Valid values are:

bitsPerPlane

Resulting bits per pixel for each plane. Possible values:

Value Meaning
0 Default bits per pixel. LEADTOOLS will pick the closest valid value.
8 Save 8 bits per component. The generated file will contain 32 bits (no alpha) or 40 bits (if alpha). Note that GetInformation(String,Boolean) or GetInformationAsync(String,Boolean,Int32,Object) will report 8 bits less (24 or 32-bit).
16 Save 16 bits per component. The generated file will contain 64 bits (no alpha) or 80 bits (if alpha). Note that GetInformation(String,Boolean) or GetInformationAsync(String,Boolean,Int32,Object) will report 16 bits less (48 or 64-bit).
pageNumber
Specifies the reference page number when saving a multipage file.
pageMode
Determines how to handle the page when saving to multipage formats.

Return Value

An asynchronous save operation on a RasterCodecs object.
Remarks

This method will save a CMYK file without performing a color conversion. Each page in the image will contain one of the C, M, Y, K, Alpha planes. The Alpha plane is optional. The image should contain:

The pages are in this order: C, M, Y, K, Alpha (optional). All the pages must have the same width, height, bits per pixel and palette.

If you want to save the pages of the image as a file format not supported by this function, use ColorMergeCommand to create a BGR image and save the generated image using the Save(RasterImage,String,RasterImageFormat,Int32) method.

CMYK TIFF files can be saved as planar (each image in its own plane) or chunky (the data from all the images will be interleaved during saving). Planar images will be saved faster, while chunky images are more compatible (some TIFF readers will not read planar files) and require less memory during the load process. The default is to save chunky files.

You select the planar save mode by setting the RasterCodecs.Options.Tiff.Save.SavePlanar property to true.

This method uses the values of RasterCodecs.Options.Tiff.Save.ImageFileDirectoryOffset.

This method can also be used to copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file. Whenever you save an image containing a region as a TIFF file format, the region is also saved. Note, however, that the ability to save a region inside a TIFF file must be unlocked. This requires a Document Imaging or Medical Imaging toolkit.

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

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RasterCodecs Class
RasterCodecs Members
Handling CMYK Files as Separate Images

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.