Sign up ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I am developing a filter in Pixel Bender. It needs me to apply an auto-fix to the image before the filter is applied.

Currently this is my progress in it ->

    dst = sampleNearest(src,outCoord());

    dst.r = ((dst.r - 0.5)*contrast)+ 0.5;
    dst.g = ((dst.g - 0.5)*contrast)+ 0.5;
    dst.b = ((dst.b - 0.5)*contrast)+ 0.5;

    dst.r = dst.r * brightness;
    dst.g = dst.g * brightness;
    dst.b = dst.b * brightness;

Bu the problem here is, in this case I have to manually change the contrast and brightness parameters. How do i apply an auto-fix on this image without having to manually change the parameters.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.