O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required