ImageSaveParams Class Documentation
class ImageSaveParamsNamespace:datalogics_interface
Detailed Description
Class that defines parameters for saving an image to a graphics file.
The parameters include the file type (such as PNG or JPG), compression, image quality, and gray scale.
Uses types
Constructor & Destructor Documentation
ImageSaveParams
ImageSaveParams()Default constructor. All options are initialised to defaults.
ImageSaveParams
ImageSaveParams(ImageSaveParams && )Parameters
~ImageSaveParams
~ImageSaveParams()Member Function Documentation
get_compression
CompressionCode get_compression()Returns:
CompressionCodeThe compression code currently set. The default is CompressionCode.Default.
Gets the type of compression to be used in saving the image to a file.
get_disable_alpha_channel_generation
bool get_disable_alpha_channel_generation()Returns:
booltrue if alpha channel generation is disabled, false otherwise.
Gets whether alpha channel generation is disabled for the output image.
When false, RGB image data with a Mask will be combined as RGBA + Alpha Channel output (32-bit). When true, the Mask is not combined and the output is RGB (24-bit). This is only valid for TIFF and PNG output formats.
get_halftone_gray_images
bool get_halftone_gray_images()Returns:
booltrue if halftone conversion is enabled, false otherwise.
Gets whether grayscale images are converted to halftone.
When true, converts 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi. Note this can only be set to true for an image of ColorSpace of DeviceGray.
get_jpeg_quality
int get_jpeg_quality()Returns:
intThe JPEG quality value (0-100). The default is 0.
Gets the quality of a JPEG output image.
get_monochrome_threshold
unsigned char get_monochrome_threshold()Returns:
unsigned charThe monochrome threshold value (0-255). The default is 128.
Gets the threshold for determining which bits are white or black for Monochrome output.
Note: this is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false.
get_raise_exception_if_not_usable_color
bool get_raise_exception_if_not_usable_color()Returns:
booltrue if an exception will be raised for unsupported color formats, false otherwise.
Gets whether an exception is raised if the image color format is not natively supported.
When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, the image will be automatically converted into a form that can be saved natively (generally DeviceRGB using the sRGB profile).
get_reverse_gray
bool get_reverse_gray()Returns:
booltrue if the grayscale output will be reversed, false otherwise.
Gets whether the GrayScale output is reversed.
Note this is only valid for an image with a DeviceGray Colorspace.
get_tiff_black_is_one
bool get_tiff_black_is_one()Returns:
booltrue if the TIFF image is photometrically reversed, false otherwise.
Gets whether a TIFF file is photometrically reversed.
Note this is only valid for a 1-bit TIFF image with a DeviceGray Colorspace.
get_tiff_byte_order
TIFFByteOrder get_tiff_byte_order()Returns:
TIFFByteOrderThe current TIFF byte order setting.
Gets the byte order used within the TIFF file.
This is only valid for TIFF output.
get_tiff_cmyk_alpha
bool get_tiff_cmyk_alpha()Returns:
booltrue if CMYK + Alpha channel TIFF output is enabled, false otherwise.
Gets whether CMYK image data is combined with the Soft Mask in TIFF output.
Note: This is only valid for CMYK image data which has a Soft Mask; the output will be 40-bit.
get_write_separation_colors_to_tiff
bool get_write_separation_colors_to_tiff()Returns:
booltrue if separation colors are written to TIFF, false if converted to sRGB.
Gets whether separation colors are written to TIFF using the Photoshop tag.
When false, separation colors will be converted to their alternate color space and rendered as RGB. When true, separation colors are output using the TIFF Photoshop tag.
operator=
ImageSaveParams & operator=(ImageSaveParams && )Parameters
Returns:
ImageSaveParams &set_compression
void set_compression(CompressionCode code)Parameters
code: CompressionCode
Returns:
voidThe compression code currently set. The default is CompressionCode.Default.
Gets the type of compression to be used in saving the image to a file.
set_disable_alpha_channel_generation
void set_disable_alpha_channel_generation(bool disable)Parameters
disable: bool
Returns:
voidtrue if alpha channel generation is disabled, false otherwise.
Gets whether alpha channel generation is disabled for the output image.
When false, RGB image data with a Mask will be combined as RGBA + Alpha Channel output (32-bit). When true, the Mask is not combined and the output is RGB (24-bit). This is only valid for TIFF and PNG output formats.
set_halftone_gray_images
void set_halftone_gray_images(bool halftone)Parameters
halftone: bool
Returns:
voidtrue if halftone conversion is enabled, false otherwise.
Gets whether grayscale images are converted to halftone.
When true, converts 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi. Note this can only be set to true for an image of ColorSpace of DeviceGray.
set_jpeg_quality
void set_jpeg_quality(int quality)Parameters
quality: int
Returns:
voidThe JPEG quality value (0-100). The default is 0.
Gets the quality of a JPEG output image.
set_monochrome_threshold
void set_monochrome_threshold(unsigned char threshold)Parameters
threshold: unsigned char
Returns:
voidThe monochrome threshold value (0-255). The default is 128.
Gets the threshold for determining which bits are white or black for Monochrome output.
Note: this is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false.
set_raise_exception_if_not_usable_color
void set_raise_exception_if_not_usable_color(bool raise)Parameters
raise: bool
Returns:
voidtrue if an exception will be raised for unsupported color formats, false otherwise.
Gets whether an exception is raised if the image color format is not natively supported.
When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, the image will be automatically converted into a form that can be saved natively (generally DeviceRGB using the sRGB profile).
set_reverse_gray
void set_reverse_gray(bool reverse)Parameters
reverse: bool
Returns:
voidtrue if the grayscale output will be reversed, false otherwise.
Gets whether the GrayScale output is reversed.
Note this is only valid for an image with a DeviceGray Colorspace.
set_tiff_black_is_one
void set_tiff_black_is_one(bool black_is_one)Parameters
black_is_one: bool
Returns:
voidtrue if the TIFF image is photometrically reversed, false otherwise.
Gets whether a TIFF file is photometrically reversed.
Note this is only valid for a 1-bit TIFF image with a DeviceGray Colorspace.
set_tiff_byte_order
void set_tiff_byte_order(TIFFByteOrder order)Parameters
order: TIFFByteOrder
Returns:
voidThe current TIFF byte order setting.
Gets the byte order used within the TIFF file.
This is only valid for TIFF output.
set_tiff_cmyk_alpha
void set_tiff_cmyk_alpha(bool cmyk_alpha)Parameters
cmyk_alpha: bool
Returns:
voidtrue if CMYK + Alpha channel TIFF output is enabled, false otherwise.
Gets whether CMYK image data is combined with the Soft Mask in TIFF output.
Note: This is only valid for CMYK image data which has a Soft Mask; the output will be 40-bit.
set_write_separation_colors_to_tiff
void set_write_separation_colors_to_tiff(bool write)Parameters
write: bool
Returns:
voidtrue if separation colors are written to TIFF, false if converted to sRGB.
Gets whether separation colors are written to TIFF using the Photoshop tag.
When false, separation colors will be converted to their alternate color space and rendered as RGB. When true, separation colors are output using the TIFF Photoshop tag.