Name

NSImageRep — Mac OS X 10.0

Synopsis

This is an abstract class that defines a general interface to image representations. NSImageRep subclasses allow NSImage to work with various image data formats using the common interface declared in NSImageRep.

image with no caption

@interface NSImageRep : NSObject <NSCoding, NSCopying>
                                  // Accessor Methods
   - (void)setSize:(NSSize)aSize;
   - (NSSize)size;
   - (void)setPixelsWide:(int)anInt;
   - (int)pixelsWide;
   - (void)setBitsPerSample:(int)anInt;
   - (int)bitsPerSample;
   - (void)setOpaque:(BOOL)flag;
   - (void)setPixelsHigh:(int)anInt;
   - (int)pixelsHigh;
   - (void)setAlpha:(BOOL)flag;
   - (void)setColorSpaceName:(NSString *)string;
   - (NSString *)colorSpaceName;
                                  // Class Methods
   + (BOOL)canInitWithData:(NSData *)data;
   + (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard;
   + (NSArray *)imageFileTypes;
   + (NSArray *)imagePasteboardTypes;
   + (Class)imageRepClassForData:(NSData *)data;
   + (Class)imageRepClassForFileType:(NSString *)type;
   + (Class)imageRepClassForPasteboardType:(NSString *)type;
   + (id)imageRepWithContentsOfFile:(NSString *)filename;
   + (id)imageRepWithContentsOfURL:(NSURL *)url;
   + (id)imageRepWithPasteboard:(NSPasteboard *)pasteboard;
   + (NSArray *)imageRepsWithContentsOfFile:(NSString *)filename;
   + (NSArray *)imageRepsWithContentsOfURL:(NSURL *)url;
   + (NSArray *)imageRepsWithPasteboard:(NSPasteboard *)pasteboard ...

Get Cocoa in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.