I would like to make a bit map image as follow array.
I think that will need to use quartz…
How to can make a bit map image?
int bit_map[10][10] = {{0,0,1,0,0,0,0,1,0,0},
{0,1,1,1,1,0,1,1,1,0},
{1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1},
{0,1,1,1,1,1,1,1,1,0},
{0,1,1,1,1,1,1,1,1,0},
{0,1,1,1,1,1,1,1,1,0},
{0,0,1,1,1,1,1,1,0,0},
{0,0,0,1,1,1,1,0,0,0},
{0,0,0,0,1,1,0,0,0,0}};
Here is code to create a CGImageRef (
cir) from theCarray. Note that things can be simpler if theCarray is one dimensional with values of 0 and 255.