Tinier Numbers: These numbers are all 3X5 images. You will also notice that a number of colors are used. There are three strategies which could be used to set colors. These strategies are described below. |
int[] a1={0,1,0, 0,1,0, 0,1,0, 0,1,0, 0,1,0};Then when setting pixel color multiply by Color.red.getRGB().
pix[i]=(255<<24)|(255<<16)|(255<<8)|255; //white or pix[i]=(255<<24)|(255<<8); //blue
int[] a1={0,1,0, 0,1,0, 0,1,0, 0,1,0, 0,1,0}; int[] a2={2,2,2, 0,0,2, 2,2,2, 2,0,0, 2,2,2 };Then simply use these numbers when assigning colors like this:
if(arr[i]==0) pix[i]=Color.black.getRGB(); else if(arr[i]==1) pix[i]=Color.red.getRGB(); etc.