1 // 2 // PRImage.h 3 // PRICE 4 // 5 // Created by Riccardo Mottola on Wed Oct 12 2005. 6 // Copyright (c) 2005-2014 Carduus. All rights reserved. 7 // 8 // This application is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 10 11 // this class implements a tailored variation of NSImage for PRICE 12 // the assumption that each time only one representation (of bitmap type) is available is done 13 // thus it can be made directly accessible as well as some of its properties can be cached 14 15 #import <AppKit/AppKit.h> 16 17 #if !defined (GNUSTEP) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4) 18 typedef int NSInteger; 19 #endif 20 21 #if !defined (GNUSTEP) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3) 22 extern NSString *NSImageEXIFData; 23 #endif 24 25 @interface PRImage : NSImage 26 { 27 @private 28 NSBitmapImageRep *bitmapRep; 29 } 30 31 - (NSInteger)height; 32 - (NSInteger)width; 33 - (BOOL)hasColor; 34 - (BOOL)hasAlpha; 35 - (NSInteger)bitsPerPixel; 36 - (NSInteger)bitsPerSample; 37 - (NSInteger)samplesPerPixel; 38 - (NSSize)pixelSize; 39 - (NSBitmapImageRep *)bitmapRep; 40 - (void)setBitmapRep:(NSBitmapImageRep *)rep; 41 42 @end 43