-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CGImage missing ctor to create from NativeHandle/IntPtr #16314
Comments
Try doing this: using ObjCRuntime;
var image = Runtime.GetINativeObject<CGImage> (imageRef, false); does that work for you? |
Hi @Cheesebaron. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@rolfbjarne yep, that seems to work. |
That is the supported path forward, as the IntPtr constructors are no longer public. Thanks for the feedback. |
…CGImagesAsynchronously. Add an overload to AVAssetImageGenerator.GenerateCGImagesAsynchronously that takes a callback we call with a managed CGImage instance instead of a CGImage handle. This makes the API a bit easier to use. Ref: dotnet#16314
I'm adding an overload that takes a callback that will be given the CGImage instance (instead of the handle): #16325. |
Steps to Reproduce
In Xamarin.iOS we can do
new CGImage(intPtr)
this is missing from net6.0-ios. I.e. we have some code generating thumbnails asynchronously:The callback in
AVAssetImageGeneratorCompletionHandler
still returns IntPtr, but there is no way to get a CGImage from it.Expected Behavior
Some way to turn the IntPtr back into a CGImage
Actual Behavior
Ctor missing
Environment
Version information
Build Logs
Example Project (If Possible)
The text was updated successfully, but these errors were encountered: