Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
UIImageBuffer - iPhone Development Wiki

UIImageBuffer

From iPhone Development Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

UIImageBuffer is a class that holds an array of RGBA color components for creating a CGImage. You should directly operate on a CGBitmapContext instead of using this class.

Example code:

UIImageBuffer* buf = [[UIImageBuffer alloc] initWithWidth:100 height:50];
UIColorComponents white = {1, 1, 1, 1};
[buf fillWithPixel:&white];
UIColorComponents red = {1, 0, 0, 1};
for (int i = 0; i < 50; ++ i)
  [buf setPixel:&red atPoint:CGPointMake(i, i)];
CGImageRef img = [buf createImage];
[buf release];
...