//
//  MSImageExclusief.h
//  ImageExport
//
//  Created by Jelle De Laender on 30/01/07.
//  Copyright 2007 GetDrawIt. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSImage (CHImageAdditions)

/* Load an Image from data (with dpi etc) */
+ (id)imageFromPath:(NSString *)path;
+ (id)imageFromData:(NSData *)data type:(NSString *)type;
+ (id)imageFromCGImageRef:(CGImageRef)image; //do not use

#pragma mark Respresentation methods

-(NSData *)JPGRepresentationWithCompression:(float)compression;
-(NSData *)PNGRepresentationWithInterlaced:(BOOL)interlaced;
-(NSData *)GIFRepresentationWithTransparency:(BOOL)transparency;

#pragma mark Export methods - local

- (void)copyToClipboard;

/* Note: You don't need to give .app extension. The app must be installed in the 'app-folder' examples: Mail, iPhoto, DrawIt, QuickScale */
- (void)openWith:(NSString *)application;
- (void)openWith:(NSString *)application fileType:(NSString *)type option:(NSNumber *)option;
- (BOOL)uploadToImageShack;

-(void)flipHorizontal;
-(void)flipVertical;
-(void)rotateClockwise;
-(void)rotateAntiClockwise;

@end

@interface CIImage (CHCIImageAdditions)
-(NSData *)JPGRepresentationWithCompression:(float)compression;
-(NSData *)PNGRepresentationWithInterlaced:(BOOL)interlaced;
-(NSData *)GIFRepresentationWithTransparency:(BOOL)transparency;
-(NSData *)TIFFRepresentation;
@end

@interface NSBitmapImageRep (CHBitmapRepAdditions)
-(NSData *)JPGRepresentationWithCompression:(float)compression;
-(NSData *)PNGRepresentationWithInterlaced:(BOOL)interlaced;
-(NSData *)GIFRepresentationWithTransparency:(BOOL)transparency;
@end