Table of Contents

Class GenericImageOptionNames

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Lists known image option names for use in GenericImage.

public class GenericImageOptionNames
Inheritance
GenericImageOptionNames

Remarks

Resolution, ResolutionX and ResolutionY options define the resolution of the image in the units corresponding to ResolutionUnit options value. The Resolution option can be set before saving the image to set both horizontal and vertical resolution to the same value. ResolutionX and ResolutionY options are set by the image handlers if they support the image resolution (currently BMP, JPEG and TIFF handlers do) and the image provides the resolution information and can be queried after loading the image.

Fields

FileName

Image option name for getting the name of the file from which the image was loaded.

GifComment

Gif image option name for setting a comment. The comment text that is read from or written to the GIF file. In an animated GIF each frame can have its own comment. If there is only a comment in the first frame of a GIF it will not be repeated in other frames.

GifTransparency

Gif image option name for setting how to deal with transparent pixels. By default, the color of transparent pixels is changed to bright pink, so that if the image is accidentally drawn without transparency, it will be obvious. Normally, this would not be noticed, as these pixels will not be rendered. But in some cases it might be useful to load a GIF without making any modifications to its colors. Supports GifTransparencyValueHighlight and GifTransparencyValueUnchanged values.

GifTransparencyValueHighlight

Defines value for the GifTransparency propertty. Use to convert transparent pixels to pink (default).

GifTransparencyValueUnchanged

Defines value for the GifTransparency propertty. Use to keep the colors correct.

MaxHeight

Image option name for setting maximal height.

MaxWidth

Image option name for setting maximal width.

OriginalHeight

Image option name for setting an original height. This option will return the original height of the image if MaxHeight is specified.

OriginalWidth

Image option name for setting an original width. This option will return the original width of the image if MaxWidth is specified.

PngBitDepth

Png image option name for setting bit depth for channels (R/G/B/A).

PngCompressionBufferSize

Png image option name for setting internal buffer size (in bytes) used when saving a PNG file. Ideally this should be as big as the resulting PNG file. Use this option if your application produces images with small size variation.

PngCompressionLevel

Png image option name for setting a compression level (0..9) when saving a PNG file. A high value creates smaller, but slower PNG file. Note that unlike other formats (e.g.JPEG) the PNG format is always lossless and thus this compression level doesn't tradeoff the image quality.

PngCompressionMemLevel

Png image option name for setting compression memory usage level (1..9) when saving a PNG file. A high value means the saving process consumes more memory, but may create smaller PNG file.

PngCompressionStrategy

Png image option name for setting a compression strategy. Possible values are 0 for default strategy, 1 for filter, and 2 for Huffman - only. You can use OptiPNG (http://optipng.sourceforge.net/) to get a suitable value for your application.

PngFilter

Png image option name for setting filter when saving a PNG file, See GenericImagePngSetFilter for possible values.

PngFormat

Png image option name for setting format when saving a PNG file, see GenericImagePngType for the supported values.

Quality

Image option name for setting JPEG quality used when saving. This is an integer in 0..100 range with 0 meaning very poor and 100 excellent (but very badly compressed). This option is currently ignored for the other formats.

Resolution

Image option name for setting resolution.

ResolutionUnit

Image option name for setting resolution unit. The value of this option determines whether the resolution of the image is specified in centimetres or inches, see GenericImageResolutionUnit enum elements.

ResolutionX

Image option name for setting horizontal resolution.

ResolutionY

Image option name for setting vertical resolution.

TiffBitsPerSample

Tiff image option name for setting number of bits per sample (channel). Currently values of 1 and 8 are supported. A value of 1 results in a black and white image. A value of 8 (the default) can mean greyscale or RGB, depending on the value of TiffSamplesPerPixel.

TiffCompression

Tiff image option name for setting compression type. By default it is set to 1 (None). Typical other values are 5 (LZW) and 7 (JPEG). See GenericImageTiffCompression for more options.

TiffImageDescriptor

Tiff image option name for setting image descriptor.

TiffPhotometric

Tiff image option name for setting the photometric interpretation. By default it is set to 2 (RGB) for RGB images and 0 (MINISWHITE) for greyscale or black and white images. It can also be set to 1 (MINISBLACK) to treat the lowest value as black and highest as white. If you want a greyscale image it is also sufficient to only specify TiffPhotometric and set it to either MINISWHITE or MINISBLACK. The other values are taken care of.

TiffSamplesPerPixel

Tiff image option name for setting number of samples (channels) per pixel. Currently values of 1 and 3 are supported. A value of 1 results in either a greyscale (by default) or black and white image, depending on the value of TiffBitsPerSample. A value of 3 (the default) will result in an RGB image.