Enum RawDemosaicMethod
How a develop fills in the colours a colour filter array did not sample.
public enum RawDemosaicMethod
Fields
Ahd = 2Hirakawa and Parks' adaptive homogeneity-directed interpolation: the fewest colour artifacts on fine detail. The default.
Bilinear = 0The average of the nearest samples of each colour. Fastest, softest.
Malvar = 1Malvar, He and Cutler's gradient-corrected interpolation: sharper than bilinear at almost the same speed.
Examples
RawReaderOptions develop = new()
{
WhiteBalance = RawWhiteBalance.Custom,
Temperature = 4800, // kelvin
Tint = 5, // toward magenta
Exposure = -0.5, // stops
Highlights = RawHighlightMode.Rebuild, // recover clipped colour from what was not clipped
Demosaic = RawDemosaicMethod.Malvar, // faster than the default AHD
LuminanceNoiseReduction = 20, // 0 to 100; off by default
ColorNoiseReduction = 40, // 0 to 100; 25 by default
AutoChromaticAberration = true, // fix colour fringes when no lens profile covers the file
DefaultToneCurve = true, // a contrast curve like Adobe Camera Raw's default; off by default
ConvertColorTo = Colors.ColorProfile.DisplayP3, // rendered straight into P3, the profile attached
};
using Raster photo = Raster.Load("photo.dng", context, develop);
photo.Save("photo-p3.png");