Class CdrImage
- Namespace
- Aspose.Imaging.FileFormats.Cdr
- Assembly
- Aspose.Imaging.dll
The API for CorelDRAW CDR vector image format support is an essential toolkit for developers working with vector graphics. This API enables the seamless processing of CDR files, allowing for the storage and manipulation of diverse elements such as text, lines, shapes, images, colors, and effects. With its comprehensive capabilities, developers can efficiently work with vector representations of image contents, ensuring precision and flexibility in creating and editing CorelDRAW vector graphics programmatically.
public class CdrImage : VectorMultipageImage, IDisposable, IObjectWithBounds, IObjectWithSizeF, IMultipageImage, ICdrImage
- Inheritance
-
CdrImage
- Implements
- Inherited Members
Constructors
CdrImage(Stream, LoadOptions)
Start working with the CdrImage class effortlessly by initializing a new instance with a stream and loadOptions parameters. Ideal for developers seeking a convenient way to load CDR images from various data sources while customizing the loading process as needed.
public CdrImage(Stream stream, LoadOptions loadOptions)
Parameters
stream
StreamThe stream.
loadOptions
LoadOptionsThe load options.
Exceptions
- IndexOutOfRangeException
CDR document contains no pages.
- See Also
Properties
BitsPerPixel
Retrieve the bit depth of the image effortlessly with this user-friendly property. Ideal for developers seeking to determine the level of detail or color depth present in their images, ensuring accurate processing and manipulation.
public override int BitsPerPixel { get; }
Property Value
- int
The image bits per pixel count.
- See Also
CdrDocument
Effortlessly retrieve or update the CDR document using this intuitive property. Ideal for developers seeking to access or modify the CDR document, ensuring flexibility and efficiency in their applications.
public CdrDocument CdrDocument { get; }
Property Value
- CdrDocument
The CDR document.
- See Also
DefaultPage
Retrieve the default page of the image with ease using this user-friendly property. Perfect for developers seeking quick access to the primary page of their image, ensuring efficient navigation and management.
[Obsolete("Please use Pages[n]")]
public override Image DefaultPage { get; }
Property Value
- Image
The default page.
- See Also
FileFormat
Retrieve the file format of the image effortlessly with this intuitive property. Ideal for developers seeking to determine the format of their images dynamically, ensuring compatibility and accurate processing in their applications.
public override FileFormat FileFormat { get; }
Property Value
- See Also
Height
Retrieve the height of the image effortlessly with this intuitive property. Perfect for developers seeking to access the dimensions of their images dynamically, ensuring accurate layout and rendering in their applications.
public override int Height { get; }
Property Value
- int
The image height.
- See Also
IsCached
Effortlessly determine whether the object's data is currently cached, eliminating the need for data reading. Ideal for developers seeking to optimize performance by leveraging cached data efficiently, ensuring faster access to object information.
public override bool IsCached { get; }
Property Value
- bool
true
if object's data is cached; otherwise,false
.
- See Also
PageCount
Effortlessly retrieve or update the total page count of the image with this intuitive property. Ideal for developers seeking to manage multi-page images dynamically, ensuring efficient navigation and manipulation of image content.
public override int PageCount { get; }
Property Value
- int
The page count.
- See Also
PageExportingAction
Effortlessly retrieve or modify the page exporting action associated with the image using this intuitive property. Ideal for developers seeking to customize the export behavior of pages within multi-page images, ensuring flexibility and efficiency in their applications. Please note that setting this method will automatically release page resources after it is executed. It will be executed just before each page is saved.
public override PageExportingAction PageExportingAction { get; set; }
Property Value
- PageExportingAction
The page exporting action.
- See Also
Pages
Retrieve the pages of the image seamlessly with this intuitive property. Ideal for developers seeking to access and manipulate individual pages within multi-page images, ensuring efficient navigation and processing.
public override Image[] Pages { get; }
Property Value
- Image[]
The pages.
- See Also
Width
Retrieve the width of the image seamlessly with this intuitive property. Ideal for developers seeking to access the dimensions of their images dynamically, ensuring precise layout and rendering in their applications.
public override int Width { get; }
Property Value
- int
The image width.
- See Also
Methods
CacheData()
Effortlessly cache the data to prevent additional loading from the underlying source with this user-friendly method. Ideal for developers seeking to optimize performance by preloading data, ensuring faster access and smoother operation in their applications. DataStreamContainer.
public override void CacheData()
- See Also
GetDefaultOptions(object[])
Retrieve the default options effortlessly with this user-friendly method. Perfect for developers seeking quick access to the default settings or configurations associated with an object, ensuring efficient customization and streamlined workflow.
public override ImageOptionsBase GetDefaultOptions(object[] args)
Parameters
args
object[]The arguments.
Returns
- ImageOptionsBase
Default options
- See Also
ReleaseManagedResources()
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
protected override void ReleaseManagedResources()
- See Also
Resize(int, int, ImageResizeSettings)
Resizes the image.
public override void Resize(int newWidth, int newHeight, ImageResizeSettings settings)
Parameters
newWidth
intThe new width.
newHeight
intThe new height.
settings
ImageResizeSettingsThe resize settings.
Exceptions
- See Also
Resize(int, int, ResizeType)
Effortlessly resize the image to desired dimensions with this intuitive method. Perfect for developers seeking to adjust the size of images dynamically, ensuring they fit the layout or requirements of their applications seamlessly.
public override void Resize(int newWidth, int newHeight, ResizeType resizeType)
Parameters
newWidth
intThe new width.
newHeight
intThe new height.
resizeType
ResizeTypeThe resize type.
Exceptions
- See Also
RotateFlip(RotateFlipType)
Adjust the orientation of the image by rotating, flipping, or applying both operations with this versatile method. Perfect for developers seeking to customize image orientation dynamically, ensuring optimal presentation or alignment in their applications.
public override void RotateFlip(RotateFlipType rotateFlipType)
Parameters
rotateFlipType
RotateFlipTypeType of the rotate flip.
Exceptions
- See Also
SaveData(Stream)
Saves the data.
protected override void SaveData(Stream stream)
Parameters
stream
StreamThe stream to save data to.
Exceptions
- See Also
SetPalette(IColorPalette, bool)
Customize the color palette of the image with this intuitive method. Ideal for developers seeking to apply specific color schemes or adjustments dynamically, ensuring precise control over the visual appearance of their images.
public override void SetPalette(IColorPalette palette, bool updateColors)
Parameters
palette
IColorPaletteThe palette to set.
updateColors
boolif set to
true
colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.
Exceptions
- See Also