Re: or Using NSImage... [was: Re: Using NSBundle]
Re: or Using NSImage... [was: Re: Using NSBundle]
- Subject: Re: or Using NSImage... [was: Re: Using NSBundle]
- From: Graham J Lee <email@hidden>
- Date: Sun, 20 Nov 2005 15:03:47 +0000
On 19 Nov 2005, at 16:54, Heinrich Giesen wrote:
On 19.11.2005, at 16:27, Graham J Lee wrote:
- (void)startAnimation
{
[super startAnimation];
[theImage initWithContentsOfFile:[[NSBundle mainBundle]
pathForResource:@"oxford-physics-apple" ofType:@"png"]];
[theImage setSize:aSize];
}
Your initialization of "theImage" looks very strange.
Yes, you're right, I'd missed out an alloc. How embarrassing :-).
But with that in, when I load the .saver bundle I get console messages:
Nov 20 14:31:13 mjollnir /Applications/System Preferences.app/
Contents/MacOS/System Preferences: CMSCreateDataProviderOrGetInfo :
Invalid colorspace type
and the -drawInRect:fromRect:operation:fraction: message just puts a
white box in the frame not the contents of my image. I converted the
image file in GIMP from a PNG to a JPG and the image successfully
draws to the screen. What are the extra steps required to draw an
image loaded from a PNG file?
Thanks,
Graham.
--
Graham Lee GPG Key ID: 01D5B9D8
UNIX Systems Manager,
Oxford Physics Practical Course
http://nextstep.sdf-eu.org 01865 273450
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden