Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I encountered a crash problem #339

Open
zjn-116373914 opened this issue Apr 30, 2024 · 1 comment
Open

I encountered a crash problem #339

zjn-116373914 opened this issue Apr 30, 2024 · 1 comment

Comments

@zjn-116373914
Copy link

I encountered a crash problem.
Crash's location is "cgImageFromFramebuffer" method in "PictureOutput.swift" class
Crash's point is "return CGImage(width:Int(framebuffer.size.width), height:Int(framebuffer.size.height), bitsPerComponent:8, bitsPerPixel:32, bytesPerRow:4 * Int(framebuffer.size.width), space:defaultRGBColorSpace, bitmapInfo:CGBitmapInfo() /| CGImageAlphaInfo.Last/, provider:dataProvider, decode:nil, shouldInterpolate:false, intent:.defaultIntent)!" line
Crash's reason is "verify_image_parameters: invalid image alphaInfo: kCGImageAlphaNone. It should be kCGImageAlphaNoneSkipLast"
Tap : Would you mind fixing this crash as soon as possible ?

Operating environment
Device : iPhone11
OS : iOS 17.1.2
Version : 0.0.1

@hudek
Copy link

hudek commented May 7, 2024

This should work:
Just change bitmapInfo:CGBitmapInfo(rawValue: CGImageAlphaInfo.noneSkipLast.rawValue)

return CGImage(width:Int(framebuffer.size.width), height:Int(framebuffer.size.height), bitsPerComponent:8, bitsPerPixel:32, bytesPerRow:4 * Int(framebuffer.size.width), space:defaultRGBColorSpace, bitmapInfo:CGBitmapInfo(rawValue: CGImageAlphaInfo.noneSkipLast.rawValue) /| CGImageAlphaInfo.Last/, provider:dataProvider, decode:nil, shouldInterpolate:false, intent:.defaultIntent)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants