RasterImage class

RasterImage class

Represents a raster image supporting raster graphics operations.

Inheritance: RasterImageImageDataStreamSupporterDisposableObject

The RasterImage type exposes the following members:

Properties

PropertyDescription
disposedGets a value indicating whether this instance is disposed.
data_stream_containerGets the object’s data stream.
is_cachedGets a value indicating whether object’s data is cached currently and no data reading is required.
boundsGets the image bounds.
containerGets the Image container.
heightGets the image height.
paletteGets or sets the color palette.
sizeGets the image size.
widthGets the image width.
has_background_colorGets or sets a value indicating whether image has background color.
background_colorGets or sets a value for the background color.
unit_typeGets current unit type.
unitless_default_unit_typeAssumed unit type when UnitType is set to Unitless
xmp_dataGets or sets the XMP metadata.
raw_indexed_color_converterGets or sets the indexed color converter
raw_custom_color_converterGets or sets the custom color converter
raw_fallback_indexGets or sets the fallback index to use when palette index is out of bounds
raw_data_settingsGets the current raw data settings. Note when using these settings the data loads without conversion.
raw_data_formatGets the raw data format.
raw_line_sizeGets the raw line size in bytes.
is_raw_data_availableGets a value indicating whether raw data loading is available.
bits_per_pixelGets the image bits per pixel count.
horizontal_resolutionGets or sets the horizontal resolution, in pixels per inch, of this RasterImage.
vertical_resolutionGets or sets the vertical resolution, in pixels per inch, of this RasterImage.
has_transparent_colorGets a value indicating whether image has transparent color.
has_alphaGets a value indicating whether this instance has alpha.
transparent_colorGets the image transparent color.

Methods

MethodDescription
saveSaves the image data to the underlying stream.
saveSaves the object’s data to the specified file location in the specified file format according to save options.
saveSaves the image’s data to the specified stream in the specified file format according to save options.
saveSaves the object’s data to the specified stream.
saveSaves the object’s data to the specified file location.
saveSaves the object’s data to the specified file location.
can_loadDetermines whether image can be loaded from the specified file path.
can_loadDetermines whether an image can be loaded from the specified file path and optionally using the specified open options
can_loadDetermines whether image can be loaded from the specified stream.
can_loadDetermines whether image can be loaded from the specified stream and optionally using the specified load_options.
get_file_formatGets the file format.
get_file_formatGets the file format.
loadLoads a new image from the specified file.
loadLoads a new image from the specified file.
loadLoads a new image from the specified stream.
loadLoads a new image from the specified stream.
ditherPerforms dithering on the current image.
ditherPerforms dithering on the current image.
resizeResizes the image.
resizeResizes the image.
cropCropping the image.
cropCrop image with shifts.
adjust_gammaGamma-correction of an image.
adjust_gammaGamma-correction of an image.
get_default_raw_dataGets the default raw data array using partial pixel loader.
get_default_raw_dataGets the default raw data array.
write_scan_lineWrites the whole scan line to the specified scan line index.
write_scan_lineWrites the whole scan line to the specified scan line index.
cache_dataCaches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.data_stream_container.
get_stringsGets all string values from image.
can_saveDetermines whether image can be saved to the specified file format represented by the passed save options.
get_default_pixelsGets the default pixels array using partial pixel loader.
binarize_otsuBinarization of an image with Otsu thresholding
binarize_bradleyBinarization of an image using Bradley’s adaptive thresholding algorithm using the integral image thresholding
adjust_brightnessAdjust of a brightness for image.
grayscaleTransformation of an image to its grayscale representation
binarize_fixedBinarization of an image with predefined threshold
rotateRotate image around the center.
adjust_contrastImage contrasting
get_default_argb_32_pixelsGets the default 32-bit ARGB pixels array.
get_argb_32_pixelGets an image 32-bit ARGB pixel.
get_pixelGets an image pixel.
set_argb_32_pixelSets an image 32-bit ARGB pixel for the specified position.
set_pixelSets an image pixel for the specified position.
read_scan_lineReads the whole scan line by the specified scan line index.
read_scan_line_argbReads the whole scan line by the specified scan line index.
load_partial_argb_32_pixelsLoads 32-bit ARGB pixels partially by packs.
load_partial_pixelsLoads pixels partially by packs.
load_argb_32_pixelsLoads 32-bit ARGB pixels.
load_pixelsLoads pixels.
load_cmyk_pixelsLoads pixels in CMYK format.
load_raw_dataLoads raw data.
save_raw_dataSaves the raw data.
save_argb_32_pixelsSaves the 32-bit ARGB pixels.
save_pixelsSaves the pixels.
save_cmyk_pixelsSaves the pixels.
set_resolutionSets the resolution for this RasterImage.
set_paletteSets the image palette.
filterFilters the specified rectangle.

See Also