Update FRAME_PROCESSORS_CREATE_OVERVIEW.mdx

This commit is contained in:
Marc Rousavy 2021-06-09 11:19:52 +02:00 committed by GitHub
parent 80e00dad03
commit 0fee78924f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,10 +69,8 @@ You can also manipulate the buffer and return it (or a copy) by using the `Frame
#import <VisionCamera/Frame.h>
static inline id resize(Frame* frame, NSArray args) {
NSNumber* width = [arguments objectAtIndex:0];
NSNumber* height = [arguments objectAtIndex:1];
CMSampleBufferRef resizedBuffer = CMSampleBufferCopyAndResize(frame.buffer, width, height);
CMSampleBufferRef resizedBuffer = // ...
return [[Frame alloc] initWithBuffer:resizedBuffer orientation:frame.orientation];
}
```