¿Alguien puede mostrar un claro ejemplo de cómo utilizar¿Cómo creo una imagen CG con datos RGB?
CGImageRef CGImageCreate
(
size_t width,
size_t height,
size_t bitsPerComponent,
size_t bitsPerPixel,
size_t bytesPerRow,
CGColorSpaceRef colorspace,
CGBitmapInfo bitmapInfo,
CGDataProviderRef provider,
const CGFloat decode[],
bool shouldInterpolate,
CGColorRenderingIntent intent
);
Tengo un CGFloat dataBuffer [ancho * alto * 3];
Contiene todos los datos RGB de la imagen. Esencialmente, va desde el píxel R (0,0), G (0,0), B (0,0), R (0,1) ... a R (ancho, alto), G (ancho, alto) , B (ancho, alto)
Conozco el tamaño de la imagen, ancho x alto. ¿Cómo uso la información que tengo y creo y CGImage?
Por favor ayuda, gracias
que publican otra pregunta que abarca la pregunta anterior. Que fue respondida correctamente por nschmidt, aquí está el enlace
Converting RGB data into a bitmap in Objective-C++ Cocoa
enlaces están rotos. – wcochran