Post not yet marked as solved
Post marked as unsolved with 0 replies, 137 views
I am creating an image using the following code:
UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat preferredFormat];
fomat.opaque = false;
NSError *error = nil;
UIImage *image = nil;
[[[UIGraphicsImageRenderer alloc] initWithSize:size format:format] runDrawingActions:^(UIGraphicsImageRendererContext *rendererContext) {
//...issue drawing commands into UIGraphicsGetCurrentContext()
} completionActions:^(UIGraphicsImageRendererContext *rendererContext) {
image = rendererContext.currentImage;
} error:&error];
When executing the line:
image = rendererContext.currentImage;
I'm seeing a call stack leading to vImageConvert_AnyToAny:
If I understand correctly, an image format conversion is occurring, which is unexpected as I am trying to draw in the device's native format.
Are there any workarounds? Or maybe it is the expected behavior and the conversion does not impact performance in any way?