GetOriginalOptions

TiffImage.GetOriginalOptions method

Retrieve options derived from the original file settings, facilitating seamless preservation of key parameters such as bit-depth and other essential attributes of the original image. Utilize this method to maintain fidelity and consistency in image processing tasks, ensuring optimal results without unnecessary alterations. For example, if we load a black-white PNG image with 1 bit per pixel and then save it using the Save 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 Save method as the second parameter.

public override ImageOptionsBase GetOriginalOptions()

Return Value

The options based on the original file settings.

Exceptions

exceptioncondition
TiffImageExceptionThere is no original options that can be extracted from image

See Also