I'm trying to make an iOS app where the user can adjust the exposure manually (I'm using a single slider to adjust ISO and shutter speed at the same time). It mostly works fine, however when I adjust these values, I can tell iOS is doing an additional tone mapping step to try to equalize the pixel values, and it messes with the exposure (for example, really brightening up dark pixels when I might actually want them dark). I've tried everything I can see in the documentation to disable this extra tone mapping step, but none of these successfully disable it (I'm testing using an iPhone 8 with iOS 13.3.1). Any ideas what else I can do to disable this effect and get unmodified pixels?
camera = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back)
if (camera.isLowLightBoostSupported)
{
camera.automaticallyEnablesLowLightBoostWhenAvailable = false;
}
if (camera.activeFormat.isGlobalToneMappingSupported)
{
camera.isGlobalToneMappingEnabled = false;
}
camera.automaticallyAdjustsVideoHDREnabled = false;
if (camera.activeFormat.isVideoHDRSupported)
{
camera.isVideoHDREnabled = false;
}