#
# Export pixels
# 

# bitmap loop

XREM "Bitmap"

X=0

FOR Y=0 TO 199
	
	FOR I=0 TO 159
		A=GETPOINT X,Y
		B=GETPOINT X+2,Y
		
		A=A*16
		C=A+B

		XBYTE C

		X=X+4

	NEXT I

NEXT Y

# palette

XREM "Palette"

A = 256

FOR Y=0 TO 15
	
	R = PEEK A
	A=A+1

	G = PEEK A
	A=A+1

	B = PEEK A
	A=A+1

	XREM "color"

	XBYTE R
	XBYTE G
	XBYTE B	

NEXT Y

SAVE

