Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

mattelaquarius_pictfiltercolour_1101261846.sdlbas

By: a guest on Jan 26th, 2011  |  syntax: SdlBasic  |  size: 26.51 KB  |  views: 77  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /usr/bin/sdlbrt
  2.  
  3. '- picture converter - Mattel Aquarius - colour version (based on a zx81 picture converter) - Paulo Silva - Jan'11 - GPL licence
  4.  
  5. finp$="lena_80x72.jpg"
  6. finp2$="_tmpr_m.png":shell("convert -modulate 100,0 "+finp$+" "+finp2$)
  7. finp3$="_tmpr_n.png":shell("convert "+finp$+" "+finp3$)
  8.  
  9. onlgr=0
  10. xed=0:yed=0
  11. open finp2$ for input as #1
  12.   for i=1 to 16:n=readbyte(1):next:for i=1 to 2:n=readbyte(1):next
  13.   xed=readbyte(1)*256:xed=xed+readbyte(1)
  14.   for i=1 to 2:n=readbyte(1):next:yed=readbyte(1)*256:yed=yed+readbyte(1)
  15.   close #1
  16.  
  17. xed2a=xed*4:xed2disp=xed2a:if xed2disp<(160+xed) then: xed2disp=160+xed:end if
  18. yed2a=yed*(8/3):yed2disp=yed2a+128:if yed2disp<(yed2a+yed) then:yed2disp=yed2a+yed:end if
  19. xed2disp2=xed*8:yed2disp2=yed*(16/3)
  20.  
  21. setdisplay(xed2disp2,yed2disp2,32,1):paper(0x808080):ink(0):pen(0):cls
  22.  
  23. loadimage(finp2$,1):pasteicon(160,yed2a+72,1)
  24. loadimage(finp3$,1):pasteicon(160+80,yed2a,1)
  25.  
  26. sub filpic7(qxx1,qyy1,qstq$)
  27.   yyt=qyy1:xxt=qxx1:tstt$=qstq$
  28.   for qq=0 to len(tstt$)-1
  29.     qu=(((val(mid$(tstt$,qq+1,1)))*255)/7):ink(rgb(qu,qu,qu)):dot(xxt+qq,yyt):next
  30.   end sub
  31.  
  32. dim paleta[16]
  33. paleta[00]=0x111111:paleta[01]=0xFF1111:paleta[02]=0x11FF11:paleta[03]=0xFFEE11
  34. paleta[04]=0x2222DD:paleta[05]=0xFF11FF:paleta[06]=0x33CCCC:paleta[07]=0xFFFFFF
  35. paleta[08]=0xCCCCCC:paleta[09]=0x22AAAA:paleta[10]=0xCC22CC:paleta[11]=0x441188
  36. paleta[12]=0xFFFF77:paleta[13]=0x22C844:paleta[14]=0xAA2222:paleta[15]=0x333333
  37.  
  38. filpic7(0,yed2a+000,"77000077707770777077707770077077777777777700007777777777777777777770077777700777777700007777777777777777000077777777777700000077")
  39. filpic7(0,yed2a+001,"77077777707707777077077777070777777077777077770777777077770777777700007777700777777770007777707777077777000777777700007700000077")
  40. filpic7(0,yed2a+002,"77077777707077777070777770707777777777770770077077777707707777777070070777700777777700007777000770007777000077777700007777000077")
  41. filpic7(0,yed2a+003,"70000777770700777707007777070077700000770707777000000000000000007770077777700777777000707770007777000777070007777777777777007777")
  42. filpic7(0,yed2a+004,"77077777707770777070707770707077777777770707777000000000000000007770077777700777770007770700077777700070777000777000000777007777")
  43. filpic7(0,yed2a+005,"70077777777707777770007777700077777077770770077077777707707777777770077770700707700077770000777777770000777700070000000077007777")
  44. filpic7(0,yed2a+006,"07070077777000777777707777777077777777777077770777777077770777777770077777000077770777770007777777777000777770770000000077007777")
  45. filpic7(0,yed2a+007,"77777777777777777777777777777777777777777700007777777777777777777770077777700777777777770000777777770000777777770000000077007777")
  46. filpic7(0,yed2a+008,"00000000700000007700007777777777700000077777777770000077777777777000007777700777777777777777000077777777000077770000777777777777")
  47. filpic7(0,yed2a+009,"77000077700000007700007777000077770000777700077777000007770007777700000077000077777777777777000077777777000077770000777777777777")
  48. filpic7(0,yed2a+010,"77000077700007777700007777000077700770077700007777700700770000777770000070077007777777777777000077777777000077770000777777777777")
  49. filpic7(0,yed2a+011,"77000077777007777700007777777777700770077777777777700007777777777700070077077077777777777777000077777777000077770000777777777777")
  50. filpic7(0,yed2a+012,"77000077777007777700007770000007000770007700077777700077770007700000770000077000777700007777777700007777777777777777000000000000")
  51. filpic7(0,yed2a+013,"77777777777007777700007700000000007777007000077777700777700007700077770007000070777700007777777700007777777777777777000000000000")
  52. filpic7(0,yed2a+014,"77777777777007777700007707000070007777007000007777000777007000000777777707700770777700007777777700007777777777777777000000000000")
  53. filpic7(0,yed2a+015,"77777777777007777700007700700700007777007000000077000777007000777777777700700700777700007777777700007777777777777777000000000000")
  54. filpic7(0,yed2a+016,"77777777777077777707077777070777777077777007777777077777777707777770777777707777777077777777777777777777777777777777777777777777")
  55. filpic7(0,yed2a+017,"77777777777077777707077777070777770000777007707770707777777707777707777777770777707070777770777777777777777777777777777777777077")
  56. filpic7(0,yed2a+018,"77777777777077777707077770000077707077777777077770707777777077777077777777777077770007777770777777777777777777777777777777770777")
  57. filpic7(0,yed2a+019,"77777777777077777777777777070777770007777770777777077777777777777077777777777077777077777000007777777777700000777777777777707777")
  58. filpic7(0,yed2a+020,"77777777777077777777777770000077777070777707777770707077777777777077777777777077770007777770777777707777777777777777777777077777")
  59. filpic7(0,yed2a+021,"77777777777777777777777777070777700007777077007770770777777777777707777777770777707070777770777777707777777777777777777770777777")
  60. filpic7(0,yed2a+022,"77777777777077777777777777070777777077777777007777007077777777777770777777707777777077777777777777077777777777777770777777777777")
  61. filpic7(0,yed2a+023,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  62. filpic7(0,yed2a+024,"77000777777077777700077770000077777707777000007777700077700000777700077777000777777777777777777777770777777777777707777777000777")
  63. filpic7(0,yed2a+025,"70777077770077777077707777777077777007777077777777077777777770777077707770777077777777777777777777707777777777777770777770777077")
  64. filpic7(0,yed2a+026,"70770077777077777777707777770777770707777000077770777777777707777077707770777077777077777770777777077777700000777777077777770777")
  65. filpic7(0,yed2a+027,"70707077777077777770077777700777707707777777707770000777777077777700077777000077777777777777777770777777777777777777707777707777")
  66. filpic7(0,yed2a+028,"70077077777077777707777777777077700007777777707770777077770777777077707777777077777077777770777777077777700000777777077777707777")
  67. filpic7(0,yed2a+029,"70777077777077777077777770777077777707777077707770777077770777777077707777770777777777777770777777707777777777777770777777777777")
  68. filpic7(0,yed2a+030,"77000777770007777000007777000777777707777700077777000777770777777700077770007777777777777707777777770777777777777707777777707777")
  69. filpic7(0,yed2a+031,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  70. filpic7(0,yed2a+032,"77000777777077777000077777000777700007777000007770000077770000777077707777000777777770777077707770777777707770777077707777000777")
  71. filpic7(0,yed2a+033,"70777077770707777077707770777077707770777077777770777777707777777077707777707777777770777077077770777777700700777077707770777077")
  72. filpic7(0,yed2a+034,"70707077707770777077707770777777707770777077777770777777707777777077707777707777777770777070777770777777707070777007707770777077")
  73. filpic7(0,yed2a+035,"70700077707770777000077770777777707770777000077770000777707777777000007777707777777770777007777770777777707070777070707770777077")
  74. filpic7(0,yed2a+036,"70700777700000777077707770777777707770777077777770777777707700777077707777707777777770777070777770777777707770777077007770777077")
  75. filpic7(0,yed2a+037,"70777777707770777077707770777077707770777077777770777777707770777077707777707777707770777077077770777777707770777077707770777077")
  76. filpic7(0,yed2a+038,"77000777707770777000077777000777700007777000007770777777770000777077707777000777770007777077707770000077707770777077707777000777")
  77. filpic7(0,yed2a+039,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  78. filpic7(0,yed2a+040,"70000777770007777000077777000777700000777077707770777077707770777077707770777077700000777000007777777777700000777777777777777777")
  79. filpic7(0,yed2a+041,"70777077707770777077707770777077777077777077707770777077707770777077707770777077777770777007777770777777777700777777777777777777")
  80. filpic7(0,yed2a+042,"70777077707770777077707770777777777077777077707770777077707770777707077777070777777707777007777777077777777700777770777777777777")
  81. filpic7(0,yed2a+043,"70000777707770777000077777000777777077777077707770777077707070777770777777707777777077777007777777707777777700777707077777777777")
  82. filpic7(0,yed2a+044,"70777777707070777070777777777077777077777077707770777077707070777707077777707777770777777007777777770777777700777077707777777777")
  83. filpic7(0,yed2a+045,"70777777707707777077077770777077777077777077707777070777700700777077707777707777707777777007777777777077777700777777777777777777")
  84. filpic7(0,yed2a+046,"70777777770070777077707777000777777077777700077777707777707770777077707777707777700000777000007777777777700000777777777770000077")
  85. filpic7(0,yed2a+047,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  86. filpic7(0,yed2a+048,"77077777777777777077777777777777777770777777777777770777777777777077777777707777777707777077777777007777777777777777777777777777")
  87. filpic7(0,yed2a+049,"77077777777777777077777777777777777770777777777777707777777777777077777777777777777777777077777777707777777777777777777777777777")
  88. filpic7(0,yed2a+050,"77707777770070777070077777700077770070777700077777707777770070777000077777007777777707777077077777707777700700777000077777000777")
  89. filpic7(0,yed2a+051,"77777777707700777007707777077777707700777077707777000777707700777077707777707777777707777070777777707777707077077077707770777077")
  90. filpic7(0,yed2a+052,"77777777707770777077707777077777707770777000007777707777707770777077707777707777777707777000777777707777707077077077707770777077")
  91. filpic7(0,yed2a+053,"77777777707700777007707777077777707700777077777777707777770000777077707777707777777707777077077777707777707077077077707770777077")
  92. filpic7(0,yed2a+054,"77777777770070777070077777700077770070777700077777707777777770777077707777000777777707777077707777000777707077077077707777000777")
  93. filpic7(0,yed2a+055,"77777777777777777777777777777777777777777777777777777777770007777777777777777777770077777777777777777777777777777777777777777777")
  94. filpic7(0,yed2a+056,"77777777777777777777777777777777777077777777777777777777777777777777777777777777777777777777007777707777700777777777777700000000")
  95. filpic7(0,yed2a+057,"77777777777777777777777777777777777077777777777777777777777777777777777777777777777777777770777777707777777077777777777700000000")
  96. filpic7(0,yed2a+058,"70700777770070777070077777000077700000777077707770777077707077077077707777077077700000777770777777707777777077777777707700000000")
  97. filpic7(0,yed2a+059,"70077077707700777007777770777777777077777077707770777077707077077707077777077077777707777707777777777777777707777700077700000000")
  98. filpic7(0,yed2a+060,"70777077707770777077777777000777777077777077707777070777707077077770777777077077777077777770777777707777777077777077777700000000")
  99. filpic7(0,yed2a+061,"70077077707700777077777777777077777077777077707777070777707077077707077777000077770777777770777777707777777077777777777700000000")
  100. filpic7(0,yed2a+062,"70700777770070777077777770000777777077777700007777707777770700777077707777777077700000777777007777707777700777777777777700000000")
  101. filpic7(0,yed2a+063,"70777777777770077777777777777777777777777777777777777777777777777777777777000777777777777777777777777777777777777777777700000000")
  102. filpic7(0,yed2a+064,"77777777077777777777777777000007777777770707777707070707777777777777777777777777777007777700007777777777770000070077777777700777")
  103. filpic7(0,yed2a+065,"00000000077777777770007770000077777777777070777770707070777007777777777777777777777007777770077777700077000000770000777777700777")
  104. filpic7(0,yed2a+066,"00000000077777777700007700700777777777770707777707070707770000777777777700000000770000770070070077000077000007770000007777000077")
  105. filpic7(0,yed2a+067,"00000000077777777777777770000777777777777070777770707070700000077777777700000000700000070000000077777777007000770000000077000077")
  106. filpic7(0,yed2a+068,"00000000077777777770007777000777070707070707777707070707700000077777777700000000000000007000000707700077007700000000000070000007")
  107. filpic7(0,yed2a+069,"00000000077777777770000777700777707070707070777770707070770000777777777700000000007007007700007707700007007777000000007770000007")
  108. filpic7(0,yed2a+070,"00000000077777777700000777700077070707070707777707070707777007770000000000000000777007777770077700000700777777700000777700000000")
  109. filpic7(0,yed2a+071,"00000000077777770000000777700077707070707070777770707070777777770000000000000000770000777770077777000700777777770077777700000000")
  110. filpic7(0,yed2a+072,"77777777000000077700007777000077070707077777070777000077007777770007777700007777770077777777007777777777777777777777770000000000")
  111. filpic7(0,yed2a+073,"77777777000000077070770770770707707070707777707070000007007777770007777700007777770007777770007770077007777007777777000000000000")
  112. filpic7(0,yed2a+074,"77777777000000077700007777000077070707077777070700000000007777770007777700007777077000777700077070000007000000007700000070000007")
  113. filpic7(0,yed2a+075,"77777777000000070777777777777770707070777777707000000000007777770007777700007777000000000000000070777707007777000000000070000007")
  114. filpic7(0,yed2a+076,"77777777000000070700007777000070777777777777070700000000007777770007777700007777000000000000000000777700707777070000000077000077")
  115. filpic7(0,yed2a+077,"77777777000000070000000000000000777777777777707000000000007777770007777700007777077000777700077000000000700000077700000077000077")
  116. filpic7(0,yed2a+078,"77777777000000077700007007000077777777777777070770000007007777770007777700007777770007777770007777700777700770077777000077700777")
  117. filpic7(0,yed2a+079,"00000000000000077700007007000077777777777777707077000077007777770007777700007777770077777777007777777777777777777777770077700777")
  118. filpic7(0,yed2a+080,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  119. filpic7(0,yed2a+081,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  120. filpic7(0,yed2a+082,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  121. filpic7(0,yed2a+083,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  122. filpic7(0,yed2a+084,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  123. filpic7(0,yed2a+085,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  124. filpic7(0,yed2a+086,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  125. filpic7(0,yed2a+087,"77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777")
  126. filpic7(0,yed2a+088,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  127. filpic7(0,yed2a+089,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  128. filpic7(0,yed2a+090,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  129. filpic7(0,yed2a+091,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  130. filpic7(0,yed2a+092,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  131. filpic7(0,yed2a+093,"00007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777")
  132. filpic7(0,yed2a+094,"00007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777")
  133. filpic7(0,yed2a+095,"00007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777")
  134. filpic7(0,yed2a+096,"77777770077777770000000000000077777777777770077777777777777700007770077777777777777777707777770077700777777007777777777777700777")
  135. filpic7(0,yed2a+097,"77777700007777770000000000000077777777777700007777777777777700007770077777777777777777077777700077700777777007777777777777700777")
  136. filpic7(0,yed2a+098,"77777000000777777000000700000077770000777000000777777777777770007770077777777777777770777777000077700777777007777777777777700777")
  137. filpic7(0,yed2a+099,"77770000000077777700007700000077770000770000000077700777777777000000000077777777777707777777000000000000777000000000077777700000")
  138. filpic7(0,yed2a+100,"77700000000007777777777700000077770000770000000077700777777777770000000000777777777077777777000000000000777000000000077777700000")
  139. filpic7(0,yed2a+101,"77000000000000777777777700000077770000777000000777777777777777777770077700077777770777777777000077777777777007777770077777777777")
  140. filpic7(0,yed2a+102,"70000000000000077777777700000077777777777700007777777777777777777770077700007777707777777777700077777777777007777770077777777777")
  141. filpic7(0,yed2a+103,"00000000000000007777777700000077777777777770077777777777777777777770077700007777077777777777770077777777777007777770077777777777")
  142. filpic7(0,yed2a+104,"77770770707077077777777777777777700770077770077777700777777777770777777000007777077777770077777777777777777007777777777777700777")
  143. filpic7(0,yed2a+105,"77077777707770777777777777707777000000007700007777700777777777777077770700007777707777770007777777777777777007777777777777700777")
  144. filpic7(0,yed2a+106,"77777077770700707777777777070077000000007770077777700777777777777707707700077777770777770000777777777777777007777777777777700777")
  145. filpic7(0,yed2a+107,"07777777007770777777777777000707000000007077770777700777777777777770077700777777777077770000777700000000000007777770000000000777")
  146. filpic7(0,yed2a+108,"77707770777077707700007770700077700000070007700077700777777777007770077777777777777707770000777700000000000007777770000000000777")
  147. filpic7(0,yed2a+109,"70777777070070777000000777007077770000777077770777700777777770007707707777777777777770770000777777700777777007777770077777777777")
  148. filpic7(0,yed2a+110,"77770777770777000000000077777077777007777770077777700777777000007077770777777777777777070007777777700777777007777770077777777777")
  149. filpic7(0,yed2a+111,"77777707707707070000000077777777777007777700007777700777777000000777777077777777777777700077777777700777777007777770077777777777")
  150. filpic7(0,yed2a+112,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  151. filpic7(0,yed2a+113,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  152. filpic7(0,yed2a+114,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  153. filpic7(0,yed2a+115,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  154. filpic7(0,yed2a+116,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  155. filpic7(0,yed2a+117,"77770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000")
  156. filpic7(0,yed2a+118,"77770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000")
  157. filpic7(0,yed2a+119,"77770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000777700007777000077770000")
  158. filpic7(0,yed2a+120,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  159. filpic7(0,yed2a+121,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  160. filpic7(0,yed2a+122,"77777777000077777777000000000000777777770000777777770000000000007777777700007777777700000000000077777777000077777777000000000000")
  161. filpic7(0,yed2a+123,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  162. filpic7(0,yed2a+124,"77777777777777777777777777777777000077770000777700007777000077777777000077770000777700007777000000000000000000000000000000000000")
  163. filpic7(0,yed2a+125,"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
  164. filpic7(0,yed2a+126,"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
  165. filpic7(0,yed2a+127,"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
  166.  
  167. filpic7(128,yed2a+000,"45555555674566665555717667175514"):filpic7(128,yed2a+001,"47555555564543345555544554453346")
  168. filpic7(128,yed2a+002,"56657676774566665555671771761147"):filpic7(128,yed2a+003,"22214455335633563255777077070777")
  169. filpic7(128,yed2a+004,"55554433334553453233747447474444"):filpic7(128,yed2a+005,"77554422442345225633707707777000")
  170. filpic7(128,yed2a+006,"77575555454657765766566777777776"):filpic7(128,yed2a+007,"77677745466656775775465667667767")
  171. filpic7(128,yed2a+008,"77677766677556776767677767776777"):filpic7(128,yed2a+009,"55575555654555555555777766776755")
  172. filpic7(128,yed2a+010,"55576665555556675565676757557667"):filpic7(128,yed2a+011,"56565656765656675657776776776767")
  173. filpic7(128,yed2a+012,"45564556454545565556755657455555"):filpic7(128,yed2a+013,"45555557555757565557754757555555")
  174. filpic7(128,yed2a+014,"56665656565667556656566656666656"):filpic7(128,yed2a+015,"45554555465555555555553667547777")
  175. filpic7(128,yed2a+016,"56554656575555455657674766746677"):filpic7(128,yed2a+017,"67566656675667666667564677557756")
  176. filpic7(128,yed2a+018,"57775777757766775767765757676777"):filpic7(128,yed2a+019,"77554556554557555557754657455555")
  177. filpic7(128,yed2a+020,"77565666565667556656666656566656"):filpic7(128,yed2a+021,"67776777577777677777776657577700")
  178. filpic7(128,yed2a+022,"45555755565555455655565767676600"):filpic7(128,yed2a+023,"56556756675567656655567667577700")
  179. filpic7(128,yed2a+024,"33576533774744667766554465232655"):filpic7(128,yed2a+025,"00575435554744337700222254230233")
  180. filpic7(128,yed2a+026,"00573254444744662200445522652611"):filpic7(128,yed2a+027,"77024554447422472707355355556211")
  181. filpic7(128,yed2a+028,"77023443567400472707222233332033"):filpic7(128,yed2a+029,"44023223777422472707355355556255")
  182. filpic7(128,yed2a+030,"77177111670761017616701066066000"):filpic7(128,yed2a+031,"77577555472745257454725244244222")
  183. filpic7(128,yed2a+032,"77777777676767677676767666666666"):filpic7(128,yed2a+033,"77177111670761017616701066066000")
  184. filpic7(128,yed2a+034,"57475545270725055444524224042202"):filpic7(128,yed2a+035,"17171717070707071616161606060606")
  185. filpic7(128,yed2a+036,"74471104664477715577757255556755"):filpic7(128,yed2a+037,"61165504441166753357667033533663")
  186. filpic7(128,yed2a+038,"20027704664477775517577266555576"):filpic7(128,yed2a+039,"65557766225555775517572766557655")
  187. filpic7(128,yed2a+040,"66455544225555755557660733356336"):filpic7(128,yed2a+041,"75541166554455615577752755555567")
  188. filpic7(128,yed2a+042,"77177111670761017616701066066000"):filpic7(128,yed2a+043,"75557454452544247252705042224020")
  189. filpic7(128,yed2a+044,"71717171616161617070707060606060"):filpic7(128,yed2a+045,"77177111670761017616701066066000")
  190. filpic7(128,yed2a+046,"55455444250524045242504022022000"):filpic7(128,yed2a+047,"11111111010101011010101000000000")
  191.  
  192. for y1=0 to 71 step 3:for x1=0 to 79 step 2
  193.   rac=0:gac=0:bac=0
  194.   for y2=0 to 2: for x2=0 to 1
  195.     x=x1+x2:y=y1+y2
  196.     u=point(x+160+80,y+yed2a)
  197.     b=u mod 256: u=int(u/256)
  198.     g=u mod 256: u=int(u/256)
  199.     r=u mod 256: u=int(u/256)
  200.     rac+=r:gac+=g:bac+=b
  201.     next:next
  202.   rav=rac/6:gav=gac/6:bav=bac/6
  203.   ink(rgb(rav,gav,bav)):bar(x1+160+80,y1+yed2a+72,x1+160+80+1,y1+yed2a+72+2)
  204.   next:next
  205.  
  206. for y1=0 to 23:for x1=0 to 39
  207.   dist=9999
  208.   u1=point(160+80+(x1*2),yed2a+72+(y1*3))
  209.   b1=u1 mod 256:u1=int(u1/256)
  210.   g1=u1 mod 256:u1=int(u1/256)
  211.   r1=u1 mod 256:u1=int(u1/256)
  212.   pp=0
  213.   for c=0 to 15
  214.     u2=paleta[c]
  215.     b2=u2 mod 256:u2=int(u2/256)
  216.     g2=u2 mod 256:u2=int(u2/256)
  217.     r2=u2 mod 256:u2=int(u2/256)
  218.     rd=abs(r2-r1):gd=abs(g2-g1):bd=abs(b2-b1)
  219.     distt=sqr((rd^2)+(gd^2)+(bd^2))
  220.     if dist>distt then: dist=distt:pp=c:end if
  221.     next
  222.   ik=0
  223.   u4=paleta[pp]
  224.   dist=9999
  225.   b4=u4 mod 256:u4=int(u4/256)
  226.   g4=u4 mod 256:u4=int(u4/256)
  227.   r4=u4 mod 256:u4=int(u4/256)
  228.   for c=0 to 15
  229.     if c<>pp then:
  230.       u2=paleta[c]
  231.       b2=u2 mod 256:u2=int(u2/256)
  232.       g2=u2 mod 256:u2=int(u2/256)
  233.       r2=u2 mod 256:u2=int(u2/256)
  234.       r3=int((r4+r2)/2):g3=int((g4+g2)/2):b3=int((b4+b2)/2)
  235.       rd=abs(r3-r1):gd=abs(g3-g1):bd=abs(b3-b1)
  236.       distt=sqr((rd^2)+(gd^2)+(bd^2))
  237.       if dist>distt then: dist=distt:ik=c:end if
  238.       end if
  239.     next
  240.  
  241.   ink (paleta[pp]):bar((xed*4)+x1*8,y1*8,7+(xed*4)+x1*8,7+(y1*8))
  242.   ink (paleta[ik]):bar(4+(xed*4)+x1*8,1+(y1*8),6+(xed*4)+x1*8,5+(y1*8))
  243.  
  244.   next:next
  245.  
  246. for y1=0 to 23:for x1=0 to 39
  247.   u1=point((xed*4)+(x1*8),y1*8)
  248.   b1=u1 mod 256:u1=int(u1/256)
  249.   g1=u1 mod 256:u1=int(u1/256)
  250.   r1=u1 mod 256:u1=int(u1/256)
  251.   w1=int(((b1*11)+(r1*30)+(g1*59))/100)
  252.   u2=point(4+(xed*4)+(x1*8),2+(y1*8))
  253.   b2=u2 mod 256:u2=int(u2/256)
  254.   g2=u2 mod 256:u2=int(u2/256)
  255.   r2=u2 mod 256:u2=int(u2/256)
  256.   w2=int(((b2*11)+(r2*30)+(g2*59))/100)
  257.   if w2<w1 then:tmz=w1:w1=w2:w2=tmz:end if
  258.   dw=w2-w1:if dw<1 then:dw=1:end if
  259.    
  260.   for y2=0 to 2: for x2=0 to 1
  261.     y=(y1*3)+y2:x=(x1*2)+x2
  262.     u3=(point(x+160,y+yed2a+72))mod 256
  263.     u4=int(((u3-w1)*255)/dw)
  264.     if u4<0 then:u4=0:end if
  265.     if u4>255 then:u4=255:end if
  266.     ink(rgb(u4,u4,u4))
  267.     dot(x+160,y+yed2a)
  268.     next:next
  269.  
  270.   next:next
  271.  
  272. for y1=0 to (yed/3)-1:for x1=0 to (xed/2)-1:dfi=65536:fgx=0:fgy=0:chid=0
  273.  
  274.   for yq=0 to 15:for xq=0 to 15:cnt=0
  275.     for y2=0 to 2:for x2=0 to 1
  276.       q1=bitwiseand(point(160+(x1*2)+x2,yed2a+(y1*3)+y2),255)
  277.       q2=bitwiseand(point(128+(xq*2)+x2,yed2a+0+(yq*3)+y2),255)
  278.       dq=abs(q2-q1):cnt=cnt+dq
  279.       next:next
  280.     if cnt<dfi then:dfi=cnt:fgx=xq:fgy=yq:end if
  281.     next:next
  282.   for y2=0 to 7:for x2=0 to 7
  283.     c=point((fgx*8)+x2,yed2a+(fgy*8)+y2):ink(c):dot((x1*8)+x2,(y1*8)+y2)
  284.     ink(point((xed*4)+(x1*8),(y1*8)))
  285.     if (c mod 256)>128 then:ink(point((xed*4)+(x1*8)+4,(y1*8)+2)):end if
  286.     dot((x1*8)+x2+(xed*4),(y1*8)+y2+ (yed*8/3))
  287.     next:next:next:next
  288.  
  289. '  fout$=finp$+".bmp":grab (1,0,0,xed2a,yed2a):saveimage (fout$,1)
  290.   fout$=finp$+".bmp":grab (1,0,0,xed2disp2,yed2disp2):saveimage (fout$,1)
  291.  
  292. '- unix only (?) - needs imagemagick installed
  293.   shell("convert "+fout$+" "+fout$+".png"):shell("rm "+fout$+" "+finp2$+" "+finp3$)  
  294.  
  295. waitkey
clone this paste RAW Paste Data