Skip to content

Commit

Permalink
Prevent filtered screenshots from using 64-bit color depth, as it cau…
Browse files Browse the repository at this point in the history
…ses some apps to misinterpret color space information
  • Loading branch information
LIJI32 committed Mar 9, 2024
1 parent 5e2b6e7 commit e7792c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AppleCommon/GBViewMetal.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ - (NSImage *)renderToImage
{
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)];
Expand Down

0 comments on commit e7792c1

Please sign in to comment.