NSImage (misc)


Declared In:
NSImage+misc.h


Category Description

This category contains methods used to support Watson tool functionality. It contains a method to make an image always be 72 DPI, and some methods to easily find images within a particular bundle.


Method Types

- normalizeSize
+ imageInBundleForClass:named:
+ imageInBundleForClass:named:inDirectory:


Class Methods

imageInBundleForClass:named:

+ (NSImage *)imageInBundleForClass:(Class)aClass named:(NSString *)imageName

Return an image in the same bundle as the given class, with the given name. If the image is not found, the placeholder "broken.tiff" image is used.


imageInBundleForClass:named:inDirectory:

+ (NSImage *)imageInBundleForClass:(Class)aClass named:(NSString *)imageName inDirectory:(NSString *)directory

Return an image in the same bundle as the given class, with the given name, in the given subfolder. If the image is not found, the placeholder "broken.tiff" image is used.


Instance Methods

normalizeSize

- (NSImage *)normalizeSize

If a bitmap image, fix the size of the bitmap so that it is equal to the exact pixel dimensions.


Version 1.1 Copyright ©2003 by Karelia Software, LLC. All Rights Reserved.