I'm having an issue with image filtering. I want to create a pipeline with 3 filter but after the image is processed, the colors of the image is more pale than it should be. My function applies 3 adjustment to the image but if I set their values to the default ones (as the user did not set any changes for the image), the image is not look like the raw image, it looks pale. This makes the whole picture look wrong.
I want to apply brightness, contrast and saturation adjustment to the picture with filterWithPipeline, as the following code snippet shows:
class func createImageForPostcard(image: UIImage, intensities: Intensities) -> UIImage {
let brightnessEffect = BrightnessAdjustment()
let contrastEffect = ContrastAdjustment()
let saturationEffect = SaturationAdjustment()
brightnessEffect.brightness = intensities.brightness
contrastEffect.contrast = intensities.contrast
saturationEffect.saturation = intensities.saturation
let filteredImage = image.filterWithPipeline { input, output in
input --> brightnessEffect --> contrastEffect --> saturationEffect --> output
}
return filteredImage
}
This is the raw image:
After applying the function with the default intensity values, it looks like this:
I do not understand why the color is modified because I set every intensity to the default value.
I would be really grateful if someone could tell me what should I do differently because I can't find any solution to get the well-filtered image.
I'm having an issue with image filtering. I want to create a pipeline with 3 filter but after the image is processed, the colors of the image is more pale than it should be. My function applies 3 adjustment to the image but if I set their values to the default ones (as the user did not set any changes for the image), the image is not look like the raw image, it looks pale. This makes the whole picture look wrong. I want to apply brightness, contrast and saturation adjustment to the picture with filterWithPipeline, as the following code snippet shows:
This is the raw image:
After applying the function with the default intensity values, it looks like this:
I do not understand why the color is modified because I set every intensity to the default value.
I would be really grateful if someone could tell me what should I do differently because I can't find any solution to get the well-filtered image.