Post

Replies

Boosts

Views

Activity

Create CGContext from CVImageBuffer - Context is nil for specific image buffer sizes
When I tried to create CGContext from CVImageBuffer with below code CGContext(data: CVPixelBufferGetBaseAddress(pixelBuffer), width: width, height: height, bitsPerComponent: 8, bytesPerRow: CVPixelBufferGetBytesPerRow(pixelBuffer), space: CGColorSpaceCreateDeviceRGB(), bitmapInfo: CGBitmapInfo(rawValue: CGImageAlphaInfo.premultipliedFirst.rawValue).union(.byteOrder32Little).rawValue) CGContext is nil with below Error CGBitmapContextCreate: invalid data bytes/row: should be at least 8640 for 8 integer bits/component, 3 components, kCGImageAlphaPremultipliedFirst. Note: This happens only with specific image buffer size like 4k, etc. And 1080p and 720p works fine. Appreciate your help in advance!
0
0
1.1k
Aug ’22
What is an internal error while saving video to PHPhotoLibrary?
My recording was stopped due to low battery and phone shutdown. When I reopen my app, the recorded ".mov video"(around 8GB) file is not moving/copying to PHPhotoLibrary and it shows internalError which is hard to understand the exact reason for denying to add the video file to PHPhotoLibrary. Error Domain=PHPhotosErrorDomain Code=-1 \"(null)\") So How to resolve such kind of internalError while adding assets to PHPhotoLibrary? Thanks & Regards, Natarajan S
2
1
1.4k
Oct ’21
How to delete PHAsset permanently from device(“Photos”) in iOS SDK?
How to delete the PHAsset from device permanently to get more space on device immediately? I could only find the following API to delete PHAsset from the Photos app which is moving the assets to "Recently Deleted" album which is still holding memory on the device, PHAssetChangeRequest.deleteAssets((assets as NSArray)) Is there a solution to delete assets (programmatically) from the Photos app permanently?
0
1
1.1k
Apr ’21