C++ (Qt)brightness = GetBrightness(pixel);if (doPow) brightness = pow(brightness, amount);if (doHermit) brightness = Hermite(brightness);SetBrightness(pixel, brightness);