44 return pixMap.
pixels != NULL &&
56 if (bufferSize == 0) bufferSize = rowBytes * height;
65 .bufferSize = bufferSize
100 if (desiredSize < minSize) desiredSize = minSize;
113 if (desiredSize == ioPixMap->
bufferSize)
return YES;
116 void *newPixels = realloc(ioPixMap->
pixels, desiredSize);
117 if (newPixels != NULL)
119 ioPixMap->
pixels = newPixels;
133 if (desiredSize <= ioPixMap->bufferSize)
return YES;
142#import "MyOpenGLView.h"
227 return [NSString stringWithFormat:@"invalid<%i>", (int)format];
uint_fast32_t OOPixMapDimension
@ kOOPixMapGrayscaleAlpha
OOINLINE size_t OOMinimumPixMapBufferSize(OOPixMap pixMap)
void OOFreePixMap(OOPixMap *ioPixMap)
NSString * OOPixMapFormatName(OOPixMapFormat format)
BOOL OOPixMapFormatHasAlpha(OOPixMapFormat format)
void OODumpPixMap(OOPixMap pixMap, NSString *name)
BOOL OOIsValidPixMapFormat(OOPixMapFormat format)
const OOPixMap kOONullPixMap
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)