More fun with CGImageSourceCreateWithURL
More fun with CGImageSourceCreateWithURL
- Subject: More fun with CGImageSourceCreateWithURL
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Mon, 17 Feb 2020 11:17:26 +0100
One of my users (maybe, they others don't bother)
told me that occasionally, they get an error message that must originate from
this piece of code in my screensaver:
NSURL * url = [NSURL fileURLWithPath: [self absolutePathFor: filename_]
isDirectory: NO];
if ( url == NULL )
{
... // never happened so far
}
CGImageSourceRef sourceRef = CGImageSourceCreateWithURL( (CFURLRef) url,
NULL );
if ( sourceRef == NULL )
{
[self displayErrorMessage: @"Image gone: " with: filename_];
...
}
He gets the error message "Image gone" - but when he checks that path, the
image is there alright.
Does anyone have an idea what might be causing CGImageSourceCreateWithURL to
return NULL?
Is there anything I can do to get to the bottom of this erratic behavior?
Best regards, Gabriel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden