49 bufferSize = rowBytes * height;
57 .bufferSize = bufferSize
95 if (desiredSize < minSize)
96 desiredSize = minSize;
115 void* newPixels = realloc(ioPixMap->
pixels, desiredSize);
116 if (newPixels != NULL) {
117 ioPixMap->
pixels = newPixels;
129 if (desiredSize <= ioPixMap->bufferSize)
220 return @"grayscale+alpha";
225 return [NSString stringWithFormat:@"invalid<%i>", (int)format];
uint32_t OOPixMapDimension
@ kOOPixMapGrayscaleAlpha
OOINLINE size_t OOMinimumPixMapBufferSize(OOPixMap pixMap)
const OOPixMap kOONullPixMap
void OOFreePixMap(OOPixMap *ioPixMap)
NSString * OOPixMapFormatName(OOPixMapFormat format)
BOOL OOPixMapFormatHasAlpha(OOPixMapFormat format)
void OODumpPixMap(OOPixMap pixMap, NSString *name)
BOOL OOIsValidPixMapFormat(OOPixMapFormat format)
OOPixMap OOAllocatePixMap(OOPixMapDimension width, OOPixMapDimension height, OOPixMapFormat format, size_t rowBytes, size_t bufferSize)
unsigned short OOPixMapBytesPerPixelForFormat(OOPixMapFormat format)
OOPixMap OOMakePixMap(void *pixels, OOPixMapDimension width, OOPixMapDimension height, OOPixMapFormat format, size_t rowBytes, size_t bufferSize)
BOOL OOResizePixMap(OOPixMap *ioPixMap, size_t desiredSize)
BOOL OOIsValidPixMap(OOPixMap pixMap)
BOOL OOExpandPixMap(OOPixMap *ioPixMap, size_t desiredSize)
OOPixMap OODuplicatePixMap(OOPixMap srcPixMap, size_t desiredSize)
void dumpRGBAToRGBFileNamed:andGrayFileNamed:bytes:width:height:rowBytes:(NSString *rgbName,[andGrayFileNamed] NSString *grayName,[bytes] uint8_t *bytes,[width] NSUInteger width,[height] NSUInteger height,[rowBytes] NSUInteger rowBytes)
void dumpGrayAlphaToFileNamed:bytes:width:height:rowBytes:(NSString *name,[bytes] uint8_t *bytes,[width] NSUInteger width,[height] NSUInteger height,[rowBytes] NSUInteger rowBytes)
void dumpGrayToFileNamed:bytes:width:height:rowBytes:(NSString *name,[bytes] uint8_t *bytes,[width] NSUInteger width,[height] NSUInteger height,[rowBytes] NSUInteger rowBytes)