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
877
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
569
Aug ’21
NSSecureCoding: Writing UIView to disk
Is it possible to write a UIView to disk using NSSecureCoding. The below code results in an error. NSData *data = [NSKeyedArchiver archivedDataWithRootObject:object requiringSecureCoding:YES error:&error]; Error: The data couldn’t be written because it isn’t in the correct format. We also tried the following: NSMutableData *data = [NSMutableData data]; NSKeyedArchiver  *archiver = [[NSKeyedArchiver alloc] initRequiringSecureCoding:YES]; [archiver encodeObject:view forKey:@"view"]; [archiver finishEncoding]; Error: This decoder will only decode classes that adopt NSSecureCoding. Class 'UIView' does not adopt it.
1
0
1.2k
May ’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
780
May ’21
AVExportSession HDR export | How to preserve color of text and other layers
Hi, We're updating our video editing app to support HDR playback/export and ran into a snag. AVPlayer (with HDR color properties) maintains the integrity of the color of text and other layers (e.g. stickers), however, AVVideoCompositionCoreAnimationTool does not. When the composition is exported, the colors of layers are being converted to HDR as well (deeper colors), which shouldn't be the case. We're using videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer. Any help would be much appreciated! Thanks, Ed
2
0
975
Nov ’20