use "std" use "canvas" g = showcanvas() IMGW = 150 IMGH = 150 IW13 = IMGW / 3 // 1/3 IW23 = IW13 * 2 // 2/3 IW2 = IMGW / 2 // 1/2 bmpRed = createBitmap(IMGW, IMGH) gr = bmpRed.getGraphics() gr.drawColor(#FF000000) gr.setColor(#FFFF0000) gr.fillCircle(IW13, IW13, IW13) pixelsRed = bmpRed.getPixels(0, IMGW, 0, 0, IMGW, IMGH) bmpGreen = createBitmap(IMGW, IMGH) gg = bmpGreen.getGraphics() gg.drawColor(#FF000000) gg.setColor(#FF00FF00) gg.fillCircle(IW23, IW13, IW13) pixelsGreen = bmpGreen.getPixels(0, IMGW, 0, 0, IMGW, IMGH) bmpBlue = createBitmap(IMGW, IMGH) gb = bmpBlue.getGraphics() gb.drawColor(#FF000000) gb.setColor(#FF0000FF) gb.fillCircle(IW2, IW23, IW13) pixelsBlue = bmpBlue.getPixels(0, IMGW, 0, 0, IMGW, IMGH) len = length(pixelsRed) pixels = newarray(len) for i = 0, i < len, i++ { pixels[i] = 0xFF000000 | ( (pixelsRed[i] & 0xFFFFFF) + (pixelsGreen[i] & 0xFFFFFF) + (pixelsBlue[i] & 0xFFFFFF) ) } result = createBitmap(pixels, 0, IMGW, IMGH, IMGH, 3) g.drawBitmap(result, 0, 0)