Class CmxImage
- Namespace
- Aspose.Imaging.FileFormats.Cmx
- Assembly
- Aspose.Imaging.dll
The API for Corel Metafile Exchange (CMX) vector image format with metadata descriptions support is a comprehensive solution for developers working with CMX files. This API allows for the seamless loading of CMX images, extracting metadata such as bits per pixel, object dimensions, and more. With additional functionalities like resizing, rotating, setting palettes, and converting to other formats, this API empowers developers to efficiently manipulate and customize CMX vector images to meet their specific application requirements.
public class CmxImage : VectorMultipageImage, IDisposable, IObjectWithBounds, IMultipageImage, ICmxImage, IObjectWithSizeF
- Inheritance
-
CmxImage
- Implements
- Inherited Members
Constructors
CmxImage(StreamContainer, LoadOptions)
Start working with the CmxImage class seamlessly by initializing a new instance with a streamContainer and loadOptions parameters. Ideal for developers seeking a convenient way to load CMX images from various data sources while customizing the loading process as needed.
public CmxImage(StreamContainer streamContainer, LoadOptions loadOptions)
Parameters
streamContainer
StreamContainerThe stream container.
loadOptions
LoadOptionsThe load options.
- 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
CmxPage
Effortlessly retrieve the CMX page of the image with this intuitive property. Ideal for developers seeking quick access to individual pages within CMX images, ensuring efficient navigation and management.
public CmxPage CmxPage { get; }
Property Value
- CmxPage
The CMX page.
- See Also
DefaultPage
Effortlessly retrieve the default page of the image with this intuitive property. Ideal 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
Document
Retrieve the CMX document effortlessly with this intuitive property. Ideal for developers seeking to access or modify CMX images, ensuring flexibility and efficiency in their applications.
public CmxDocument Document { get; }
Property Value
- CmxDocument
The CMX document.
- See Also
FileFormat
Retrieve the file format of the image effortlessly with this user-friendly 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
HeightF
Effortlessly obtain the height of the object, measured in inches, with this user-friendly property. Ideal for developers seeking precise dimensional information for effective layout and presentation in their applications.
public override float HeightF { get; }
Property Value
- float
The object height, in inches.
- See Also
IsCached
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
Retrieve 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
WidthF
Retrieve the width of the object in inches with this intuitive property. Ideal for developers seeking precise measurements of objects in their applications, ensuring accurate layout and presentation.
public override float WidthF { get; }
Property Value
- float
The object width, in inches.
- See Also
Methods
CacheData()
Cache the data to prevent additional loading from the underlying source DataStreamContainer with this convenient method. Ideal for developers seeking to optimize performance by preloading data, ensuring faster access and smoother operation in their applications.
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.
- 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.
- See Also
RotateFlip(RotateFlipType)
Effortlessly 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.
- See Also
SaveData(Stream)
Saves the data.
protected override void SaveData(Stream stream)
Parameters
stream
StreamThe stream to save data to.
- 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.
- See Also