Hi, [NSImage imageNamed:] provides a very easy way to grab images. You can simply provide a name, minus even an extension, and NSImage will find your image. However, this can be more intensive than required when you already know your image's extension. For example, when you strace a gnustep app right now there are hundreds of attempts to find images -- this method loops through every possible directory with every possible image extension until it finds the right one -- used in the AppKit. The time involved is not huge, but it is entirely unnecessary I think. With the attached patch I've added a '.tiff' extention to most images loaded in the AppKit.
2003-03-17 Michael Hanni <[EMAIL PROTECTED]>
* Source/NSApplication: added .tiff to images we grab off the disk
to help streamline the loading process.
* Source/NSBrowserCell.m: ditto
* Source/NSButtonCell.m: ditto
* Source/NSMenuItemCell.m: ditto
* Source/NSMenuItem.m: ditto
* Source/NSPopUpButtonCell.m: ditto
* Source/NSScroller.m: ditto
* Source/NSWindow.m: ditto
Cheers,
Michael
tiff.change.diff
Description: tiff.change.diff
_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep
