04-11-2005, 05:07 AM
lol...
fb, compile it, then drag a 256 color bmp on it
Code:
screen 18:type chopinteger field = 1:left as UShort:right as UShort:end Type:type BMPFileInfo field = 1:BIid as Short:BIfilesize as Long:BIreserved as Short:BIreserved2 as Short:BIoffset as Long:end Type:type BMPHeaderInfo field = 1:BIheadersize as Long:BIwidth as Integer:BIheight as Integer:BIplanes as Short:BIbpp as Short:BIcompressionfactor as Long:BIimagesize as Long:BIpelwidth as Long:BIpelheight as Long:BIcolorused as Long:BIimportantcolors as Long:end Type:type RGBQuad field = 1:blue as UShort:green as UShort:red as UShort:end Type:dim fileheader as BMPFileInfo:dim infoheader as BMPHeaderInfo:dim colors(255) as RGBQuad:dim pixelint as chopinteger:dim rgbbloc as chopinteger:dim grabpixels as UShort:dim rgbhold as UInteger:xdifferential = 0:ydifferential = 0:open command$ for binary as #1:get #1,, fileheader:get #1,, infoheader:dim picarray(4 + (infoheader.BIwidth * infoheader.BIheight)) as UShort:for grabcolors = 0 to 255:get #1,, rgbbloc.left:get #1,, rgbbloc.right:colors(grabcolors).red = (rgbbloc.left and 255) \ 4:colors(grabcolors).green = (rgbbloc.left shr 8 ) \ 4:colors(grabcolors).blue = (rgbbloc.right and 255) \ 4: palette grabcolors, rgb(colors(grabcolors).red, colors(grabcolors).green, colors(grabcolors).blue):Next:for y = (infoheader.BIheight) to 1 step -1:for x = 1 to ((infoheader.BIwidth) \ 2):get #1,, grabpixels:pixelint.left = grabpixels and 255:pixelint.right = grabpixels shr 8:pset((x * 2) - 1 + xdifferential,(y - 1) + ydifferential), pixelint.left:pset((x * 2) + xdifferential,(y - 1) + ydifferential), pixelint.right:Next:Next:close #1:sleep
fb, compile it, then drag a 256 color bmp on it