//
//  NSBitmapImageRep_vImageSupport.h
//  BXBase
//
//  Created by Nicholas Shanks on 19/09/2007.
//  Copyright 2007 Boinx. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Accelerate/Accelerate.h>

@interface NSBitmapImageRep (vImageSupport)

+ (NSBitmapImageRep *)imageRepForVImageOperationsWithSize:(NSSize)size withColorSpaceNamed:(NSString *)inColorSpaceName;
- (NSBitmapImageRep *)initForVImageOperationsWithSize:(NSSize)size withColorSpaceNamed:(NSString *)inColorSpaceName;

- (BOOL)isVImageCompatible;
- (vImage_Buffer)vImageBuffer;

// pass YES to permute RGBA->ARGB; pass NO to permute ARGB->RGBA
//		this currently breaks the continuous recording mode in ISM (funky colours) and is presumed flawed
//- (void)permuteInPlaceRGBAtoARGB:(BOOL)RGBA_to_ARGB;

// pass YES to permute in prepartion for vImage operations, pass NO if this is not needed
//		this method is currently untested
//- (void *)create32BitDataAndPermuteRGBAtoARGB:(BOOL)permute;

- (NSImage *)scaledImageWithSize:(NSSize)size formatIsARGB:(BOOL)isARGB;

@end
