#! /usr/bin/sdlbrt

finp$="19_Beach_CBorn.png"

fout$=finp$+".bin"
setdisplay(320,240,32,1):paper(8^8-1):ink(0):pen(0):cls
loadimage(finp$,1):pasteicon(0,0,1)

open fout$ for output as #1

for y=0 to 23:for x=0 to 31
  u=point(x,y)
  b=bitwiseand(u,255):u=int(u/256)
  g=bitwiseand(u,255):u=int(u/256)
  r=bitwiseand(u,255)

  r=int(r/43)
  g=int(g/43)
  b=int(b/43)

  c=(b)+(r*6)+(g*36)

  writebyte(1,c)
  next:next

close #1


