如何在iOS应用程序中使用Lightroom Preset作为照片或视频的过滤器?

时间:2017-11-29 12:49:35

标签: ios core-graphics gpuimage lightroom preset

如何通过 GPUImage 核心图形或通过 Lightroom预设中的任何其他框架将滤镜应用于图像。

如何在图像上单独使用Lightroom Presets'元素(对比度,饱和度,色调,清晰度等)。

单个Lightroom预设元素:

enter image description here

1 个答案:

答案 0 :(得分:1)

不幸的是,这不是一件容易的事,因为要使用Lightroom预设作为过滤器,你需要制作一个自制的Lightroom子集。

1:用文本编辑器打开预设文件,研究Lightroom用于实现效果的处理方式,类似

value = {
        settings = {
            AutoLateralCA = 0,
            Blacks2012 = 49,
            BlueHue = 11,
            BlueSaturation = 4,
            CameraProfile = "Adobe Standard",
            ChromaticAberrationB = 0,
            ChromaticAberrationR = 0,
            Clarity2012 = 30,
            ColorNoiseReduction = 0,
            ColorNoiseReductionDetail = 50,
            ColorNoiseReductionSmoothness = 50,
            Contrast2012 = 13,
            ConvertToGrayscale = true,
            CropConstrainToWarp = 0,
            Defringe = 0,
            DefringeGreenAmount = 0,
            DefringeGreenHueHi = 60,
            DefringeGreenHueLo = 40,
            DefringePurpleAmount = 0,
            DefringePurpleHueHi = 70,
            DefringePurpleHueLo = 30,
            EnableCalibration = true,
            EnableCircularGradientBasedCorrections = true,
            EnableDetail = true,
            EnableEffects = true,
            EnableGradientBasedCorrections = true,
            EnableGrayscaleMix = true,
            EnableLensCorrections = true,
            EnableSplitToning = true,
            Exposure2012 = 0,
            GrainAmount = 0,
            GrainFrequency = 50,
            GrainSize = 25,
            GrayMixerAqua = 4,
            GrayMixerBlue = -14,
            GrayMixerGreen = -11,
            GrayMixerMagenta = 3,
            GrayMixerOrange = -3,
            GrayMixerPurple = 13,
            GrayMixerRed = 8,
            GrayMixerYellow = -6,
            GreenHue = 26,
            GreenSaturation = -1,
            Highlights2012 = -9,
            LensManualDistortionAmount = 0,
            LensProfileEnable = 0,
            LensProfileSetup = "LensDefaults",
            LuminanceNoiseReductionContrast = 0,
            LuminanceNoiseReductionDetail = 50,
            LuminanceSmoothing = 0,
            ParametricDarks = 8,
            ParametricHighlightSplit = 75,
            ParametricHighlights = 2,
            ParametricLights = 15,
            ParametricMidtoneSplit = 50,
            ParametricShadowSplit = 25,
            ParametricShadows = 9,
            PerspectiveAspect = 0,
            PerspectiveHorizontal = 0,
            PerspectiveRotate = 0,
            PerspectiveScale = 100,
            PerspectiveUpright = 0,
            PerspectiveVertical = 0,
            PostCropVignetteAmount = 0,
            PostCropVignetteFeather = 50,
            PostCropVignetteHighlightContrast = 0,
            PostCropVignetteMidpoint = 50,
            PostCropVignetteRoundness = 0,
            PostCropVignetteStyle = 1,
            ProcessVersion = "6.7",
            RedHue = 10,
            RedSaturation = -5,
            ShadowTint = 0,
            Shadows2012 = 37,
            SharpenDetail = 25,
            SharpenEdgeMasking = 0,
            SharpenRadius = 1,
            Sharpness = 0,
            SplitToningBalance = 0,
            SplitToningHighlightHue = 0,
            SplitToningHighlightSaturation = 0,
            SplitToningShadowHue = 0,
            SplitToningShadowSaturation = 0,
            ToneCurveName2012 = "Black-Mamba_FLP.co",
            ToneCurvePV2012 = {
                0,
                33,
                47,
                38,
                88,
                73,
                116,
                131,
                143,
                179,
                202,
                216,
                255,
                243,
            },
            ToneCurvePV2012Blue = {
                0,
                0,
                255,
                255,
            },
            ToneCurvePV2012Green = {
                0,
                0,
                255,
                255,
            },
            ToneCurvePV2012Red = {
                0,
                0,
                255,
                255,
            },
            VignetteAmount = -7,
            VignetteMidpoint = 46,
            WhiteBalance = "As Shot",
            Whites2012 = 23,
            orientation = "BC",
        },

2:实现Lightroom用于应用预设的所有方法,您可以在帮助中使用this之类的库

3:您需要一种方法将所有预设设置重新映射为变量并应用过滤器