CdrImage Class
Summary: 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.
Module: aspose.imaging.fileformats.cdr
Full Name: aspose.imaging.fileformats.cdr.CdrImage
Inheritance: IObjectWithBounds, IObjectWithSizeF, IMultipageImage, ICdrImage, VectorMultipageImage
Constructors
Name | Description |
---|---|
CdrImage(stream, load_options) | 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. |
Properties
Name | Type | Access | Description |
---|---|---|---|
auto_adjust_palette | bool | r/w | Gets or sets a value indicating whether automatic adjust palette. |
background_color | Color | r/w | Gets or sets a value for the background color. |
bits_per_pixel | int | r | 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. |
bounds | Rectangle | r | Gets the object bounds. |
buffer_size_hint | int | r/w | Gets or sets the buffer size hint which is defined max allowed size for all internal buffers. |
cdr_document | CdrDocument | r | 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. |
container | Image | r | Gets the Image container. |
data_stream_container | StreamContainer | r | Gets the object’s data stream. |
default_page | Image | r | 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. |
disposed | bool | r | Gets a value indicating whether this instance is disposed. |
file_format | FileFormat | r | 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. |
has_background_color | bool | r/w | Gets or sets a value indicating whether image has background color. |
height | int | r | 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. |
height_f | float | r | Gets the object height, in inches. |
interrupt_monitor | InterruptMonitor | r/w | Gets or sets the interrupt monitor. |
is_cached | bool | r | 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. |
page_count | int | r | 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. |
pages | Image[] | r | 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. |
palette | IColorPalette | r/w | Gets or sets the color palette. The color palette is not used when pixels are represented directly. |
size | Size | r | Gets the object size. |
size_f | SizeF | r | Gets the object size, in inches. |
use_palette | bool | r | Gets a value indicating whether the image palette is used. |
width | int | r | 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. |
width_f | float | r | Gets the object width, in inches. |
Methods
Name | Description |
---|---|
cache_data() | 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. DataStreamSupporter.data_stream_container. |
can_load(file_path) | Determines whether image can be loaded from the specified file path. |
can_load(file_path, load_options) | Determines whether image can be loaded from the specified file path and optionally using the specified open options. |
can_load(stream) | Determines whether image can be loaded from the specified stream. |
can_load(stream, load_options) | Determines whether image can be loaded from the specified stream and optionally using the specified loadOptions. |
can_load_stream(stream) | Determines whether image can be loaded from the specified stream. |
can_load_stream_with_options(stream, load_options) | Determines whether image can be loaded from the specified stream and optionally using the specified loadOptions. |
can_load_with_options(file_path, load_options) | Determines whether image can be loaded from the specified file path and optionally using the specified open options. |
can_save(options) | Determines whether image can be saved to the specified file format represented by the passed save options. |
create(image_options, width, height) | Creates a new image using the specified create options. |
create(images) | Creates a new image using the specified images as pages |
create(images, dispose_images) | Creates a new image the specified images as pages. |
get_default_options(args) | 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. |
get_embedded_images() | Gets the embedded images. |
get_file_format(file_path) | Gets the file format. |
get_file_format(stream) | Gets the file format. |
get_file_format_of_stream(stream) | Gets the file format. |
get_fitting_rectangle(rectangle, pixels, width, height) | Gets rectangle which fits the current image. |
get_fitting_rectangle(rectangle, width, height) | Gets rectangle which fits the current image. |
get_original_options() | Gets the options based on the original file settings. This can be helpful to keep bit-depth and other parameters of the original image unchanged. For example, if we load a black-white PNG image with 1 bit per pixel and then save it using the DataStreamSupporter.save(file_path) method, the output PNG image with 8-bit per pixel will be produced. To avoid it and save PNG image with 1-bit per pixel, use this method to get corresponding saving options and pass them to the Image.save(file_path, options) method as the second parameter. |
get_proportional_height(width, height, new_width) | Gets a proportional height. |
get_proportional_width(width, height, new_height) | Gets a proportional width. |
get_serialized_stream(image_options, clipping_rectangle, page_number) | Converts to aps. |
load(file_path) | Loads a new image from the specified file path or URL. If filePath is a file path the method just opens the file. If filePath is an URL, the method downloads the file, stores it as a temporary one, and opens it. |
load(file_path, load_options) | Loads a new image from the specified file path or URL. If filePath is a file path the method just opens the file. If filePath is an URL, the method downloads the file, stores it as a temporary one, and opens it. |
load(stream) | Loads a new image from the specified stream. |
load(stream, load_options) | Loads a new image from the specified stream. |
load_stream(stream) | Loads a new image from the specified stream. |
load_stream_with_options(stream, load_options) | Loads a new image from the specified stream. |
load_with_options(file_path, load_options) | Loads a new image from the specified file path or URL. If filePath is a file path the method just opens the file. If filePath is an URL, the method downloads the file, stores it as a temporary one, and opens it. |
remove_background() | Removes the background. |
remove_background(settings) | Removes the background. |
remove_metadata() | Removes metadata. |
resize(new_width, new_height) | Resizes the image. The default ResizeType.NEAREST_NEIGHBOUR_RESAMPLE is used. |
resize(new_width, new_height, resize_type) | Resizes the image. |
resize(new_width, new_height, settings) | Resizes the image. |
resize_by_settings(new_width, new_height, settings) | Resizes the image. |
resize_by_type(new_width, new_height, resize_type) | Resizes the image. |
resize_height_proportionally(new_height) | Resizes the height proportionally. The default ResizeType.NEAREST_NEIGHBOUR_RESAMPLE is used. |
resize_height_proportionally(new_height, resize_type) | Resizes the height proportionally. |
resize_height_proportionally(new_height, settings) | Resizes the height proportionally. |
resize_height_proportionally_settings(new_height, settings) | Resizes the height proportionally. |
resize_width_proportionally(new_width) | Resizes the width proportionally. The default ResizeType.NEAREST_NEIGHBOUR_RESAMPLE is used. |
resize_width_proportionally(new_width, resize_type) | Resizes the width proportionally. |
resize_width_proportionally(new_width, settings) | Resizes the width proportionally. |
resize_width_proportionally_settings(new_width, settings) | Resizes the width proportionally. |
rotate_flip(rotate_flip_type) | 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. |
save() | Saves the image data to the underlying stream. |
save(file_path) | Saves the image to the specified file location. |
save(file_path, options) | Saves the object’s data to the specified file location in the specified file format according to save options. |
save(file_path, options, bounds_rectangle) | Saves the object’s data to the specified file location in the specified file format according to save options. |
save(file_path, over_write) | Saves the object’s data to the specified file location. |
save(stream) | Saves the data. |
save(stream, options_base) | Saves the image’s data to the specified stream in the specified file format according to save options. |
save(stream, options_base, bounds_rectangle) | Saves the image’s data to the specified stream in the specified file format according to save options. |
save_to_stream(stream) | Saves the object’s data to the specified stream. |
save_to_stream_with_options(stream, options_base) | Saves the image’s data to the specified stream in the specified file format according to save options. |
save_to_stream_with_options_rect(stream, options_base, bounds_rectangle) | Saves the image’s data to the specified stream in the specified file format according to save options. |
save_with_options(file_path, options) | Saves the object’s data to the specified file location in the specified file format according to save options. |
save_with_options_rect(file_path, options, bounds_rectangle) | Saves the object’s data to the specified file location in the specified file format according to save options. |
set_palette(palette, update_colors) | 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. |
Constructor: CdrImage(stream, load_options)
CdrImage(stream, load_options)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream. |
load_options | LoadOptions | The load options. |
Method: can_load(file_path) [static]
can_load(file_path)
Determines whether image can be loaded from the specified file path.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
Returns
Type | Description |
---|---|
bool |
Method: can_load(file_path, load_options) [static]
can_load(file_path, load_options)
Determines whether image can be loaded from the specified file path and optionally using the specified open options.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
bool |
Method: can_load(stream) [static]
can_load(stream)
Determines whether image can be loaded from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load from. |
Returns
Type | Description |
---|---|
bool |
Method: can_load(stream, load_options) [static]
can_load(stream, load_options)
Determines whether image can be loaded from the specified stream and optionally using the specified loadOptions.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load from. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
bool |
Method: can_load_stream(stream) [static]
can_load_stream(stream)
Determines whether image can be loaded from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load from. |
Returns
Type | Description |
---|---|
bool |
Method: can_load_stream_with_options(stream, load_options) [static]
can_load_stream_with_options(stream, load_options)
Determines whether image can be loaded from the specified stream and optionally using the specified loadOptions.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load from. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
bool |
Method: can_load_with_options(file_path, load_options) [static]
can_load_with_options(file_path, load_options)
Determines whether image can be loaded from the specified file path and optionally using the specified open options.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
bool |
Method: can_save(options)
can_save(options)
Determines whether image can be saved to the specified file format represented by the passed save options.
Parameters:
Parameter | Type | Description |
---|---|---|
options | ImageOptionsBase | The save options to use. |
Returns
Type | Description |
---|---|
bool |
Method: create(image_options, width, height) [static]
create(image_options, width, height)
Creates a new image using the specified create options.
Parameters:
Parameter | Type | Description |
---|---|---|
image_options | ImageOptionsBase | The image options. |
width | int | The width. |
height | int | The height. |
Returns
Type | Description |
---|---|
Image | The newly created image. |
Method: create(images) [static]
create(images)
Creates a new image using the specified images as pages
Parameters:
Parameter | Type | Description |
---|---|---|
images | Image[] | The images. |
Returns
Type | Description |
---|---|
Image | The Image as IMultipageImage |
Method: create(images, dispose_images) [static]
create(images, dispose_images)
Creates a new image the specified images as pages.
Parameters:
Parameter | Type | Description |
---|---|---|
images | Image[] | The images. |
dispose_images | bool | if set to |
Returns
Type | Description |
---|---|
Image | The Image as IMultipageImage |
Method: get_default_options(args)
get_default_options(args)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
args | object | The arguments. |
Returns
Type | Description |
---|---|
ImageOptionsBase | Default options |
Method: get_embedded_images()
get_embedded_images()
Gets the embedded images.
Returns
Type | Description |
---|---|
EmbeddedImage[] | Array of images |
Method: get_file_format(file_path) [static]
get_file_format(file_path)
Gets the file format.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
Returns
Type | Description |
---|---|
FileFormat | The determined file format. |
Method: get_file_format(stream) [static]
get_file_format(stream)
Gets the file format.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream. |
Returns
Type | Description |
---|---|
FileFormat | The determined file format. |
Method: get_file_format_of_stream(stream) [static]
get_file_format_of_stream(stream)
Gets the file format.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream. |
Returns
Type | Description |
---|---|
FileFormat | The determined file format. |
Method: get_fitting_rectangle(rectangle, pixels, width, height) [static]
get_fitting_rectangle(rectangle, pixels, width, height)
Gets rectangle which fits the current image.
Parameters:
Parameter | Type | Description |
---|---|---|
rectangle | Rectangle | The rectangle to get fitting rectangle for. |
pixels | int | The 32-bit ARGB pixels. |
width | int | The object width. |
height | int | The object height. |
Returns
Type | Description |
---|---|
Rectangle | The fitting rectangle or exception if no fitting rectangle can be found. |
Method: get_fitting_rectangle(rectangle, width, height) [static]
get_fitting_rectangle(rectangle, width, height)
Gets rectangle which fits the current image.
Parameters:
Parameter | Type | Description |
---|---|---|
rectangle | Rectangle | The rectangle to get fitting rectangle for. |
width | int | The object width. |
height | int | The object height. |
Returns
Type | Description |
---|---|
Rectangle | The fitting rectangle or exception if no fitting rectangle can be found. |
Method: get_original_options()
get_original_options()
Gets the options based on the original file settings.
This can be helpful to keep bit-depth and other parameters of the original image unchanged.
For example, if we load a black-white PNG image with 1 bit per pixel and then save it using the
DataStreamSupporter.save(file_path) method, the output PNG image with 8-bit per pixel will be produced.
To avoid it and save PNG image with 1-bit per pixel, use this method to get corresponding saving options and pass them
to the Image.save(file_path, options) method as the second parameter.
Returns
Type | Description |
---|---|
ImageOptionsBase | The options based on the original file settings. |
Method: get_proportional_height(width, height, new_width) [static]
get_proportional_height(width, height, new_width)
Gets a proportional height.
Parameters:
Parameter | Type | Description |
---|---|---|
width | int | The width. |
height | int | The height. |
new_width | int | The new width. |
Returns
Type | Description |
---|---|
int | The proportional height. |
Method: get_proportional_width(width, height, new_height) [static]
get_proportional_width(width, height, new_height)
Gets a proportional width.
Parameters:
Parameter | Type | Description |
---|---|---|
width | int | The width. |
height | int | The height. |
new_height | int | The new height. |
Returns
Type | Description |
---|---|
int | The proportional width. |
Method: get_serialized_stream(image_options, clipping_rectangle, page_number)
get_serialized_stream(image_options, clipping_rectangle, page_number)
Converts to aps.
Parameters:
Parameter | Type | Description |
---|---|---|
image_options | ImageOptionsBase | The image options. |
clipping_rectangle | Rectangle | The clipping rectangle. |
page_number | int[] | The page number. |
Returns
Type | Description |
---|---|
_io.BufferedRandom | The serialized stream |
Method: load(file_path) [static]
load(file_path)
Loads a new image from the specified file path or URL.
If filePath is a file path the method just opens the file.
If filePath is an URL, the method downloads the file, stores it as a temporary one, and opens it.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path or URL to load image from. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: load(file_path, load_options) [static]
load(file_path, load_options)
Loads a new image from the specified file path or URL.
If filePath is a file path the method just opens the file.
If filePath is an URL, the method downloads the file, stores it as a temporary one, and opens it.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path or URL to load image from. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: load(stream) [static]
load(stream)
Loads a new image from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load image from. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: load(stream, load_options) [static]
load(stream, load_options)
Loads a new image from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load image from. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: load_stream(stream) [static]
load_stream(stream)
Loads a new image from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load image from. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: load_stream_with_options(stream, load_options) [static]
load_stream_with_options(stream, load_options)
Loads a new image from the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to load image from. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: load_with_options(file_path, load_options) [static]
load_with_options(file_path, load_options)
Loads a new image from the specified file path or URL.
If filePath is a file path the method just opens the file.
If filePath is an URL, the method downloads the file, stores it as a temporary one, and opens it.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path or URL to load image from. |
load_options | LoadOptions | The load options. |
Returns
Type | Description |
---|---|
Image | The loaded image. |
Method: remove_background(settings)
remove_background(settings)
Removes the background.
Parameters:
Parameter | Type | Description |
---|---|---|
settings | RemoveBackgroundSettings | The settings. |
Method: resize(new_width, new_height)
resize(new_width, new_height)
Resizes the image. The default ResizeType.NEAREST_NEIGHBOUR_RESAMPLE is used.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
new_height | int | The new height. |
Method: resize(new_width, new_height, resize_type)
resize(new_width, new_height, resize_type)
Resizes the image.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
new_height | int | The new height. |
resize_type | ResizeType | The resize type. |
Method: resize(new_width, new_height, settings)
resize(new_width, new_height, settings)
Resizes the image.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
new_height | int | The new height. |
settings | ImageResizeSettings | The resize settings. |
Method: resize_by_settings(new_width, new_height, settings)
resize_by_settings(new_width, new_height, settings)
Resizes the image.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
new_height | int | The new height. |
settings | ImageResizeSettings | The resize settings. |
Method: resize_by_type(new_width, new_height, resize_type)
resize_by_type(new_width, new_height, resize_type)
Resizes the image.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
new_height | int | The new height. |
resize_type | ResizeType | The resize type. |
Method: resize_height_proportionally(new_height)
resize_height_proportionally(new_height)
Resizes the height proportionally. The default ResizeType.NEAREST_NEIGHBOUR_RESAMPLE is used.
Parameters:
Parameter | Type | Description |
---|---|---|
new_height | int | The new height. |
Method: resize_height_proportionally(new_height, resize_type)
resize_height_proportionally(new_height, resize_type)
Resizes the height proportionally.
Parameters:
Parameter | Type | Description |
---|---|---|
new_height | int | The new height. |
resize_type | ResizeType | Type of the resize. |
Method: resize_height_proportionally(new_height, settings)
resize_height_proportionally(new_height, settings)
Resizes the height proportionally.
Parameters:
Parameter | Type | Description |
---|---|---|
new_height | int | The new height. |
settings | ImageResizeSettings | The image resize settings. |
Method: resize_height_proportionally_settings(new_height, settings)
resize_height_proportionally_settings(new_height, settings)
Resizes the height proportionally.
Parameters:
Parameter | Type | Description |
---|---|---|
new_height | int | The new height. |
settings | ImageResizeSettings | The image resize settings. |
Method: resize_width_proportionally(new_width)
resize_width_proportionally(new_width)
Resizes the width proportionally. The default ResizeType.NEAREST_NEIGHBOUR_RESAMPLE is used.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
Method: resize_width_proportionally(new_width, resize_type)
resize_width_proportionally(new_width, resize_type)
Resizes the width proportionally.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
resize_type | ResizeType | Type of the resize. |
Method: resize_width_proportionally(new_width, settings)
resize_width_proportionally(new_width, settings)
Resizes the width proportionally.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
settings | ImageResizeSettings | The image resize settings. |
Method: resize_width_proportionally_settings(new_width, settings)
resize_width_proportionally_settings(new_width, settings)
Resizes the width proportionally.
Parameters:
Parameter | Type | Description |
---|---|---|
new_width | int | The new width. |
settings | ImageResizeSettings | The image resize settings. |
Method: rotate_flip(rotate_flip_type)
rotate_flip(rotate_flip_type)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
rotate_flip_type | RotateFlipType | Type of the rotate flip. |
Method: save(file_path)
save(file_path)
Saves the image to the specified file location.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path to save the image to. |
Method: save(file_path, options)
save(file_path, options)
Saves the object’s data to the specified file location in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
options | ImageOptionsBase | The options. |
Method: save(file_path, options, bounds_rectangle)
save(file_path, options, bounds_rectangle)
Saves the object’s data to the specified file location in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
options | ImageOptionsBase | The options. |
bounds_rectangle | Rectangle | The destination image bounds rectangle. Set the empty rectangle for use sourse bounds. |
Method: save(file_path, over_write)
save(file_path, over_write)
Saves the object’s data to the specified file location.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path to save the object’s data to. |
over_write | bool | if set to |
Method: save(stream)
save(stream)
Saves the data.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to save data to. |
Method: save(stream, options_base)
save(stream, options_base)
Saves the image’s data to the specified stream in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to save the image’s data to. |
options_base | ImageOptionsBase | The save options. |
Method: save(stream, options_base, bounds_rectangle)
save(stream, options_base, bounds_rectangle)
Saves the image’s data to the specified stream in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to save the image’s data to. |
options_base | ImageOptionsBase | The save options. |
bounds_rectangle | Rectangle | The destination image bounds rectangle. Set the empty rectangle for use source bounds. |
Method: save_to_stream(stream)
save_to_stream(stream)
Saves the object’s data to the specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to save the object’s data to. |
Method: save_to_stream_with_options(stream, options_base)
save_to_stream_with_options(stream, options_base)
Saves the image’s data to the specified stream in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to save the image’s data to. |
options_base | ImageOptionsBase | The save options. |
Method: save_to_stream_with_options_rect(stream, options_base, bounds_rectangle)
save_to_stream_with_options_rect(stream, options_base, bounds_rectangle)
Saves the image’s data to the specified stream in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | _io.BufferedRandom | The stream to save the image’s data to. |
options_base | ImageOptionsBase | The save options. |
bounds_rectangle | Rectangle | The destination image bounds rectangle. Set the empty rectangle for use source bounds. |
Method: save_with_options(file_path, options)
save_with_options(file_path, options)
Saves the object’s data to the specified file location in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
options | ImageOptionsBase | The options. |
Method: save_with_options_rect(file_path, options, bounds_rectangle)
save_with_options_rect(file_path, options, bounds_rectangle)
Saves the object’s data to the specified file location in the specified file format according to save options.
Parameters:
Parameter | Type | Description |
---|---|---|
file_path | string | The file path. |
options | ImageOptionsBase | The options. |
bounds_rectangle | Rectangle | The destination image bounds rectangle. Set the empty rectangle for use sourse bounds. |
Method: set_palette(palette, update_colors)
set_palette(palette, update_colors)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
palette | IColorPalette | The palette to set. |
update_colors | bool | if set to indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries. |