Post

Replies

Boosts

Views

Activity

CISourceOverComposition unexpected behavior
When a filter is applied, source over compositing resulting in (unexpected behavior) filter bleeding into the background (the color of the background image is changing to gray). I had to use CIBlendWithAlphaMask setting the foreground image as the mask to work around this issue. CIFilter *tonalFilter = [CIFilter filterWithName:@"CIPhotoEffectTonal"];         [tonalFilter setValue:filterImage forKey:kCIInputImageKey];         video1FilteredImage = [tonalFilter valueForKey:@"outputImage"]; CIFilter *colorGenerator = [CIFilter filterWithName:@"CIConstantColorGenerator"];                 CIColor *inputColor = [[CIColor alloc] initWithColor:currentInstruction.compositionBackgroundColor];                 [colorGenerator setValue:inputColor forKey:@"inputColor"];                 CIImage *colorBackgroundImage = [colorGenerator valueForKey:@"outputImage"]; CIFilter *sourceOverCompositing = [CIFilter filterWithName:@"CISourceOverCompositing"];                 [sourceOverCompositing setValue:video1FilteredImage forKey:kCIInputImageKey];                 [sourceOverCompositing setValue:colorBackgroundImage forKey:kCIInputBackgroundImageKey];                 video1FilteredImage = [sourceOverCompositing valueForKey:@"outputImage"];
1
0
1.1k
May ’22
iOS: How to embed location data into a RAW/DNG image when captured by the camera
Using the following code, RAW/DNG images loose their location data when exported to a different device or computer. [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{             PHAssetResourceCreationOptions *options = [[PHAssetResourceCreationOptions alloc] init];             options.shouldMoveFile = YES;                          PHAssetCreationRequest *creationRequest = [PHAssetCreationRequest creationRequestForAsset];             creationRequest.location = locManager.location;             if(rawEmbedsJPEGOnOff == 0){                 [creationRequest addResourceWithType:PHAssetResourceTypePhoto data:photoData options:nil];                 [creationRequest addResourceWithType:PHAssetResourceTypeAlternatePhoto fileURL:temporaryFormatFileURL options:options]; // Add move (not copy) option             }             else if(rawEmbedsJPEGOnOff == 1){                 [creationRequest addResourceWithType:PHAssetResourceTypePhoto fileURL:temporaryFormatFileURL options:options];             }         } completionHandler:^( BOOL success, NSError *error ){             if(!success){                 NSLog( @"Error occurred while saving raw photo to photo library: %@", error );             }             else{                 NSLog( @"Raw photo was saved to photo library" ); }];
0
0
695
Aug ’21
M1 Mac (Designed for iPad) Video Editing App Export Session Export Failing
Hi guys, We're testing our video editing iPad app on an M1 iMac and the export session export process starts but freezes and fails soon after with the following error. Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED  MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 1 try Any ideas on how to resolve this? Thanks! Jed Update: Looks like AVVideoCompositionCoreAnimationTool is causing the issue. When we commented out that line, the export was successful.
1
0
956
Aug ’21
CISourceOverComposition unexpected behavior
When a filter is applied, source over compositing resulting in (unexpected behavior) filter bleeding into the background (the color of the background image is changing to gray). I had to use CIBlendWithAlphaMask setting the foreground image as the mask to work around this issue. CIFilter *tonalFilter = [CIFilter filterWithName:@"CIPhotoEffectTonal"];         [tonalFilter setValue:filterImage forKey:kCIInputImageKey];         video1FilteredImage = [tonalFilter valueForKey:@"outputImage"]; CIFilter *colorGenerator = [CIFilter filterWithName:@"CIConstantColorGenerator"];                 CIColor *inputColor = [[CIColor alloc] initWithColor:currentInstruction.compositionBackgroundColor];                 [colorGenerator setValue:inputColor forKey:@"inputColor"];                 CIImage *colorBackgroundImage = [colorGenerator valueForKey:@"outputImage"]; CIFilter *sourceOverCompositing = [CIFilter filterWithName:@"CISourceOverCompositing"];                 [sourceOverCompositing setValue:video1FilteredImage forKey:kCIInputImageKey];                 [sourceOverCompositing setValue:colorBackgroundImage forKey:kCIInputBackgroundImageKey];                 video1FilteredImage = [sourceOverCompositing valueForKey:@"outputImage"];
Replies
1
Boosts
0
Views
1.1k
Activity
May ’22
iOS: How to embed location data into a RAW/DNG image when captured by the camera
Using the following code, RAW/DNG images loose their location data when exported to a different device or computer. [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{             PHAssetResourceCreationOptions *options = [[PHAssetResourceCreationOptions alloc] init];             options.shouldMoveFile = YES;                          PHAssetCreationRequest *creationRequest = [PHAssetCreationRequest creationRequestForAsset];             creationRequest.location = locManager.location;             if(rawEmbedsJPEGOnOff == 0){                 [creationRequest addResourceWithType:PHAssetResourceTypePhoto data:photoData options:nil];                 [creationRequest addResourceWithType:PHAssetResourceTypeAlternatePhoto fileURL:temporaryFormatFileURL options:options]; // Add move (not copy) option             }             else if(rawEmbedsJPEGOnOff == 1){                 [creationRequest addResourceWithType:PHAssetResourceTypePhoto fileURL:temporaryFormatFileURL options:options];             }         } completionHandler:^( BOOL success, NSError *error ){             if(!success){                 NSLog( @"Error occurred while saving raw photo to photo library: %@", error );             }             else{                 NSLog( @"Raw photo was saved to photo library" ); }];
Replies
0
Boosts
0
Views
695
Activity
Aug ’21
AVFoundation setPreferredPolarPattern AVAudioSessionPolarPatternStereo returning no audio on iOS 15
AVFoundation setPreferredPolarPattern AVAudioSessionPolarPatternStereo returning no audio on iOS 15. AVAudioSessionPolarPatternOmnidirectional works as expected.
Replies
0
Boosts
0
Views
726
Activity
Aug ’21
M1 Mac (Designed for iPad) Video Editing App Export Session Export Failing
Hi guys, We're testing our video editing iPad app on an M1 iMac and the export session export process starts but freezes and fails soon after with the following error. Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED  MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 1 try Any ideas on how to resolve this? Thanks! Jed Update: Looks like AVVideoCompositionCoreAnimationTool is causing the issue. When we commented out that line, the export was successful.
Replies
1
Boosts
0
Views
956
Activity
Aug ’21