SHARE
TWEET

Untitled

a guest Jul 6th, 2017 174 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. finp$="01.png"
  2. fout$=finp$+".bin"
  3. ' converts a 128x192 4c picture into a 'pmode3:screen1,0' binary file
  4. setdisplay(128,192,32,1):paper(8^8-1):ink(0):pen(0):cls
  5. loadimage(finp$,1):pasteicon(0,0,1)
  6. open fout$ for output as #1
  7. for y=0 to 191
  8.   for x1=0 to 31
  9.     btv=0:btt=0
  10.     for x2=3 to 0 step -1
  11.       btv=btv*4
  12.       u=point(x1*4+(3-x2),y)
  13.       b=u mod 256: u=int(u/256)
  14.       g=u mod 256: u=int(u/256)
  15.       r=u mod 256: u=int(u/256)
  16.       btt=0
  17.       if r>128 then:btt=1:end if
  18.       if g<128 then:btt=2:end if
  19.       if r>128 and g<128 then:btt=3:end if
  20.       btv=btv+btt
  21.       next
  22.     writebyte(1,btv)
  23.     next:next
  24. close #1
  25. 'waitkey
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top