Prevent filtered screenshots from using 64-bit color depth, as it causes some apps to misinterpret color space information

This commit is contained in:
Lior Halphon 2024-03-09 21:04:54 +02:00
parent 5e2b6e7e9e
commit e7792c16b2
1 changed files with 2 additions and 1 deletions

View File

@ -246,7 +246,8 @@ static const vector_float2 rect[] =
{
CIImage *ciImage = [CIImage imageWithMTLTexture:[[(MTKView *)self.internalView currentDrawable] texture]
options:@{
kCIImageColorSpace: (__bridge_transfer id)CGColorSpaceCreateDeviceRGB()
kCIImageColorSpace: (__bridge_transfer id)CGColorSpaceCreateDeviceRGB(),
kCIImageProperties: [NSNull null]
}];
ciImage = [ciImage imageByApplyingTransform:CGAffineTransformTranslate(CGAffineTransformMakeScale(1, -1),
0, ciImage.extent.size.height)];