.. _doxcsid-class_p1_1_1_image_sdk_1_1_convert_config: ConvertConfig Class ~~~~~~~~~~~~~~~~~~~ Definition ^^^^^^^^^^ *Namespace:* ``P1.ImageSdk`` Defines a set of RAW convertion- and filter-flags, that can be applied to a raw-image :ref:`More...` .. ref-code-block:: csharp :class: doxyrest-overview-code-block public class ConvertConfig .. _csdetails-class_p1_1_1_image_sdk_1_1_convert_config: Remarks ^^^^^^^ Defines a set of RAW convertion- and filter-flags, that can be applied to a raw-image This class let you raw convert an IIQ raw-image. Use it to setup decoding and convertion options, before actual triggering the convertion with :ref:`ApplyTo `. You can also apply different filters to the image, including scaling and cropping. You should note that the order the filters are applied is fixed. You cannot define any ordering on your own. Any applied cropping or resizing dimensions might not be followed 100% by resampling algorithm. The resulting image might differ with a few pixels. Always check the output dimensions, and do not assume your image has the crop you requested. Simple one-liner raw convertion and scaling var bitmap = new :ref:`ConvertConfig() `.SetScale(0.25).AppleTo(new :ref:`RawImage ` ("some-file.iiq")); .. rubric:: See also: :ref:`RawImage.Convert ` Constructors ^^^^^^^^^^^^ .. toctree:: :hidden: ConvertConfig .. list-table:: :widths: 30 70 * - :ref:`ConvertConfig() ` - Creates a new raw convertion config object Members ^^^^^^^ .. toctree:: :hidden: ExposureRange ContrastRange BrightnessRange SaturationRange ShadowRecoveryRange HighlightRecoveryRange BlackLevelRange WhiteLevelRange MidtoneLevelRange CurveInOutRange ClarityMethodRange ClarityFactorRange NoiseReductionRadiusRange WhiteBalanceGainRange GeometricCorrectionFocalLengthRange GeometricCorrectionPixelPitchRange GeometricCorrectionShiftRange GeometricCorrectionPolinomRange .. list-table:: :widths: 30 70 * - :ref:`ExposureRange ` - The :ref:`value range ` of the Exposure property. * - :ref:`ContrastRange ` - The :ref:`value range ` of the Contrast property. * - :ref:`BrightnessRange ` - The :ref:`value range ` of the Brightness property. * - :ref:`SaturationRange ` - The :ref:`value range ` of the Saturation property. * - :ref:`ShadowRecoveryRange ` - The :ref:`value range ` of the ShadowRecovery property. * - :ref:`HighlightRecoveryRange ` - The :ref:`value range ` of the HighlightRecovery property. * - :ref:`BlackLevelRange ` - The :ref:`value range ` of the BlackLevel property. * - :ref:`WhiteLevelRange ` - The :ref:`value range ` of the WhiteLevel property. * - :ref:`MidtoneLevelRange ` - The :ref:`value range ` of the MidtoneLevel property. * - :ref:`CurveInOutRange ` - The :ref:`value range ` of the X and Y field of each element of the curve type properties. * - :ref:`ClarityMethodRange ` - The :ref:`value range ` of the Method field of the :ref:`Clarity ` property. * - :ref:`ClarityFactorRange ` - The :ref:`value range ` of the Factor field of the :ref:`Clarity ` property. * - :ref:`NoiseReductionRadiusRange ` - The :ref:`value range ` of the NoiseReductionRadius property. * - :ref:`WhiteBalanceGainRange ` - The :ref:`value range ` of the RGB channels of the White Balance Gain property. * - :ref:`GeometricCorrectionFocalLengthRange ` - The :ref:`value range ` of the FocalLength field of the :ref:`GeometricCorrection ` property. * - :ref:`GeometricCorrectionPixelPitchRange ` - The :ref:`value range ` of the PixelSize field of the :ref:`GeometricCorrection ` property. * - :ref:`GeometricCorrectionShiftRange ` - The :ref:`value range ` of the xp, yp fields of the :ref:`GeometricCorrection ` property. * - :ref:`GeometricCorrectionPolinomRange ` - The :ref:`value range ` of the k1, k2, k3, p1, p2, b1, b2 fields of the :ref:`GeometricCorrection ` property. Properties ^^^^^^^^^^ .. toctree:: :hidden: Exposure Contrast Brightness Saturation HighlightRecovery ShadowRecovery BlackLevel MidtoneLevel WhiteLevel RedCurve GreenCurve BlueCurve LumaCurve RGBCurve WhiteBalanceGain Clarity NoiseReductionRadius SharpeningAmount GeometricCorrectionEnabled GeometricCorrection LightFalloffCorrectionEnabled HistogramStage EnableLinearPath ChromaticAberrationCorrectionEnabled ExposureWarningMaskEnabled ExposureWarningThresholdOver ExposureWarningThresholdUnder ClipWarningMaskEnabled ClipWarningCount CanvasClip Crop OutputScaleFactor OutputWidth OutputHeight .. list-table:: :widths: 30 70 * - :ref:`Exposure ` - Adjust the exposure of the image * - :ref:`Contrast ` - Adjust the contrast of the image. * - :ref:`Brightness ` - Adjust the brightness of the image * - :ref:`Saturation ` - Adjust the saturation of the image * - :ref:`HighlightRecovery ` - Used to extract details only in the highlights of the image by reducing the brightness of highlight pixels. * - :ref:`ShadowRecovery ` - Used to extract details only in the shadows of the image by making them brighter. * - :ref:`BlackLevel ` - Set the level used for black. This is a color that black color is mapped into (as in a level tool) * - :ref:`MidtoneLevel ` - Set the midtone level. This is a color that is used as 50% level of the color values * - :ref:`WhiteLevel ` - Set the level used for white. This is a color that white color is mapped into (as in a level tool) * - :ref:`RedCurve ` - Set the curve for red values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`GreenCurve ` - Set the curve for green values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`BlueCurve ` - Set the curve for blue values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`LumaCurve ` - Set the curve for luma values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`RGBCurve ` - Set the curve for rgb values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`WhiteBalanceGain ` - The White Balance as gain for each channels (RGB). The valid range of each individual channel is between 0.0f and 10.0f. * - :ref:`Clarity ` - Setup the clarity tool. Its used as a tool to help control the local contrast in the image. * - :ref:`NoiseReductionRadius ` - The pixel radius used for the Noise Reduction algorithm to sample neighbouring pixels to reduce noise. The value is between 0 and 32. Default is 0. * - :ref:`SharpeningAmount ` - Adjust the amount of sharpening of the image. SharpeningAmount is a value between -10.0 and 10.0. Default is 0.0 * - :ref:`GeometricCorrectionEnabled ` - A Boolean value indicating if the conversion will include Geometric Aberration correction * - :ref:`GeometricCorrection ` - Custom Geometric Aberration correction parameter set. If geometricCorrection is set to an invalid value, the the conversion will try to load the geometric correction data embedded in the source IIQ file * - :ref:`LightFalloffCorrectionEnabled ` - A Boolean value indicating if the conversion will include Lens Light falloff correction for recognized lenses * - :ref:`HistogramStage ` - Request in which stage of the processing pipeline a histogram must be sampled (its mainly used for debugging). Default is to not sample a histogram. * - :ref:`EnableLinearPath ` - Set EnableLinearPath setting. This setting is used to disable most of the processing steps to make sure that the debayering of the image into rgb domain is done only using a simple linear mapping enabling only the minimum needed processing. * - :ref:`ChromaticAberrationCorrectionEnabled ` - A Boolean value indicating if the conversion will include Chromatic Aberration (CA) correction * - :ref:`ExposureWarningMaskEnabled ` - Control generation of exposure mask in the mask image. True means enable. Default is disabled. When doing the actual convertion of an image - a mask buffer must be provided. If enabled the underexposed threshold and overexposed threshold should also be set * - :ref:`ExposureWarningThresholdOver ` - Set the value of the overexposed warning settings used when exposure mask generation is enabled. ExposeWarningThresholdOver is a value between 0.0 and 1.0 so it is independend oof the bitdepth of the image * - :ref:`ExposureWarningThresholdUnder ` - Set the value of the underexposed warning settings used when exposure mask generation is enabled. ExposeWarningThresholdUnder is a value between 0.0 and 1.0 so it is independend oof the bitdepth of the image * - :ref:`ClipWarningMaskEnabled ` - enable the clip warning mask. For this setting to be used the mask image must be enabled and provided when processing the image * - :ref:`ClipWarningCount ` - Set the minimum required count of neighbour pixels that must be outside the threshold limits to be set in the clip warning mask. For this to take effect the mask image must be enabled . ClipWarningCount is a value between 1 and 8. * - :ref:`CanvasClip ` - Configures the Canvas Clipping for the conversion * - :ref:`Crop ` - The cropping configuration of the outpu * - :ref:`OutputScaleFactor ` - The scaling factor of the output image if set. * - :ref:`OutputWidth ` - The width of the output image if set. * - :ref:`OutputHeight ` - The height of the output image if set. Methods ^^^^^^^ .. toctree:: :hidden: Clone SetOutputFormat OutputFormat SetCanvasClip SetCrop SetCrop ResetCrop ResetOutputScaling SetOutputScale SetOutputWidth SetOutputHeight SetContrast SetBrightness SetSaturation SetExposure SetGain SetBlackLevel SetMidtoneLevel SetWhiteLevel SetSharpeningAmount SetNoiseReductionRadiusAmount SetClarity SetShadowRecovery SetHighlightRecovery SetWhiteBalanceGain SetGeometricCorrectionEnabled SetGeometricCorrection SetEnableLinearPath SetHistogramStage SetExposureMaskThreshold SetMaskThresholdClipWarningCount SetRedCurve SetGreenCurve SetBlueCurve SetLumaCurve SetRgbCurve SaveToFile Serialize ApplyTo ApplyTo newFromFile Deserialize Discretize .. list-table:: :widths: 33 67 * - :ref:`Clone() ` - Creates a clone of the current :ref:`ConvertConfig `, which can be modified independently of the current object * - :ref:`SetOutputFormat(BitmapFormat format) ` - Set the pixel format for the output image. * - :ref:`OutputFormat() ` - Gets the current configured pixel format, that this config object will produce * - :ref:`SetCanvasClip(CanvasClip canvasClip) ` - Sets the :ref:`CanvasClip ` property * - :ref:`SetCrop(int x, int y, int width, int height) ` - Configure for cropping the raw-image * - :ref:`SetCrop(Rect cropRect) ` - Configure for cropping the raw-image * - :ref:`ResetCrop() ` - Reset (remove) any applied crop * - :ref:`ResetOutputScaling() ` - Convenience method to reset (remove) any scaling. * - :ref:`SetOutputScale(double scaleFactor) ` - Configure scaling of the raw-image * - :ref:`SetOutputWidth(int destinationWidth) ` - Configures the output scaling using an absolute output *width*. Height is automatically calculated from the aspect ratio. * - :ref:`SetOutputHeight(int destinationHeight) ` - Configures the output scaling using an absolute output *height*. Width is automatically calculated from the aspect ratio. * - :ref:`SetContrast(float contrast) ` - Adjust the contrast of the image * - :ref:`SetBrightness(float brightness) ` - Adjust the brightness of the image * - :ref:`SetSaturation(float saturation) ` - Adjust the saturation of colors in the image * - :ref:`SetExposure(float exposure) ` - Adjust th exposure of the image. This is doing almost the same as the SetGain but using an exponential function. * - :ref:`SetGain(float gain) ` - Adjust the gain of the image. This is doing almost the same as SetExposure but just as a linear gain value. * - :ref:`SetBlackLevel(float r, float g, float b) ` - Set the black level. This is a color that is regarded as black as in the level tool of most image editors * - :ref:`SetMidtoneLevel(float r, float g, float b) ` - Set the midtone level. This is a color that is used as 50% level of the color values. Known from the level tool of most image editors * - :ref:`SetWhiteLevel(float r, float g, float b) ` - Set the white level. This is a color that is regarded as white. Known from the level tool of most image editors * - :ref:`SetSharpeningAmount(float sharpeningAmount) ` - Adjust the amount of sharpening of the image. * - :ref:`SetNoiseReductionRadiusAmount(int noiseReductionRadius) ` - Sets the pixel radius used for the Noise Reduction algorithm to reduce noise. * - :ref:`SetClarity(int clarityMethod, float clarityFactor) ` - Setup the clarity tool. Its used as a tool to help control the local contrast in the image. A negative value will decrease local contrast and and positive increase it. Its a combination of selecting a method and a factor (amount) * - :ref:`SetShadowRecovery(float shadowRecovery) ` - Set shadow recovery. Used to extract details only in the shadows of the image by making them brighter. * - :ref:`SetHighlightRecovery(float highlightRecovery) ` - Set highlight recovery. Used to extract details only in the highlights of the image by reducing the brightness of highlight pixels. * - :ref:`SetWhiteBalanceGain(float redGain, float greenGain, float blueGain) ` - Sets the White Balance as gain for each channels (RGB) * - :ref:`SetGeometricCorrectionEnabled(bool enabled) ` - Sets the Enabled state of the Geometric Aberration correction * - :ref:`SetGeometricCorrection(GeometricCorrection geometricCorrection) ` - Sets Geometric Aberration correction parameters to be applied. * - :ref:`SetEnableLinearPath(bool enabled) ` - Set EnableLinearPath setting. This setting is used to disable most of the processing steps to make sure that the debayering of the image into rgb domain is done only using a simple linear mapping enabling only the minimum needed processing. * - :ref:`SetHistogramStage(HistogramStage stage) ` - Request in which stage of the processing pipeline a histogram must be sampled (its mainly used for debugging). Default is to not sample a histogram Its a combination of selecting a method and a factor (amount) * - :ref:`SetExposureMaskThreshold(float overExposureThreshold, float underExposureThreshold) ` - Threshold for exposure mask * - :ref:`SetMaskThresholdClipWarningCount(int count) ` - Threshold for clipping count * - :ref:`SetRedCurve(Point2D[] points) ` - Set the curve for red values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`SetGreenCurve(Point2D[] points) ` - Set the curve for green values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`SetBlueCurve(Point2D[] points) ` - Set the curve for blue values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`SetLumaCurve(Point2D[] points) ` - Set the curve for luma values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`SetRgbCurve(Point2D[] points) ` - Set the curve for rgb values as known from the curves tool in most image editors. The curve is defined as a vector of discreete coordinate pairs (x,y) that is interpolated. * - :ref:`SaveToFile(string filePath) ` - Stores the :ref:`ConvertConfig ` object to a persisted model located at filePath * - :ref:`Serialize() ` - Returns a serialized JSON representation of the :ref:`ConvertConfig ` object * - :ref:`ApplyTo(RawImage image, Func\< UInt32, byte[]> allocFunction=null) ` - Trigger processing of the applied options on the raw-image and return a new image as an RGB bitmap * - :ref:`ApplyTo(RawImage image, ref BitmapImage maskImage, Func\< UInt32, byte[]> allocFunction=null) ` - Trigger processing of the applied options on the raw-image and return a new image as an RGB bitmap * - :ref:`newFromFile(string filePath) ` - Creates a :ref:`ConvertConfig ` object from a persisted model located at filePath * - :ref:`Deserialize(string json) ` - Creates a :ref:`ConvertConfig ` object from a well-formed JSON string * - :ref:`Discretize(Point2D[] points, UInt16 bits) ` - Returns a list of 'Y' values of the Curve defined by the input Points. This is applicable for the RGB/LumaCurve)