« DenkForm Schulung zur… | Home | MBS Xojo Plugins, ver… »

Load RAW image on MacOS with options

The CoreImage functions from macOS allow you to load RAW files and pass various options. The follow example code for MBS Xojo Plugins shows how to use the RAW options:

dim options as new Dictionary dim d1 as Double = BaselineExposureSlider.Value dim d2 as Double = BoostSlider.Value dim d3 as Double = BoostShadowAmountSlider.Value options.Value(CIFilterMBS.kCIInputBaselineExposureKey ) = d1/100.0 options.Value(CIFilterMBS.kCIInputBoostKey) = d2/100.0 options.Value(CIFilterMBS.kCIInputBoostShadowAmountKey) = d3/100.0 dim f as CIFilterMBS = CIFilterMBS.filterWithImageFile(file, options) pic = f.outputImage.RenderPictureWithAlpha
As you see, we have file property with folder item for the RAW file. We ask the system to load image and return a CIFilter setup for the image. This filter is configured with various options like baseline exposure to allow to change exposure. Than we can ask filter for the rendered output image or ask for content compressed as PNG or JPEG to save to disk.

See CIFilterMBS.filterWithImageFile for details. The biggest plugin in space...
20 12 17 - 17:36