I would like to upsize (explode) the image by duplicating pixels.
1 px -> 2px
Knowing how to read individal pixels (RGBA):
CFDataRef m_DataRef = CGDataProviderCopyData(CGImageGetDataProvider(myImage));
UInt8 * m_PixelBuf = (UInt8 *) CFDataGetBytePtr(m_DataRef);
int length = CFDataGetLength(m_DataRef);
for (int i=0; i<length; i+=4){
int r = i;
int g = i+1;
int b = i+2;
int a = i+3;
}
How do I go about upsizing the image. I tried copying pixels in a linear fashion but I ended up with an image of two images side by side.
create a CGBitmapContext at the destination size then draw the image to it.