Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I started C++!
#19
lol...


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
Reply


Messages In This Thread
I started C++! - by NovaProgramming - 04-09-2005, 01:53 AM
I started C++! - by ComDriver - 04-09-2005, 02:17 AM
I started C++! - by shiftLynx - 04-09-2005, 03:09 AM
I started C++! - by urger - 04-09-2005, 04:03 AM
I started C++! - by computerkid14 - 04-09-2005, 05:44 AM
I started C++! - by relsoft - 04-09-2005, 07:32 AM
I started C++! - by NovaProgramming - 04-09-2005, 05:13 PM
I started C++! - by computerkid14 - 04-09-2005, 09:54 PM
I started C++! - by marzecTM - 04-09-2005, 11:08 PM
Re: I started C++! - by seph - 04-09-2005, 11:25 PM
I started C++! - by Rattrapmax6 - 04-10-2005, 03:38 AM
Re: I started C++! - by marzecTM - 04-10-2005, 04:03 AM
I started C++! - by Sterling Christensen - 04-10-2005, 04:32 AM
I started C++! - by NovaProgramming - 04-10-2005, 08:36 PM
I started C++! - by seph - 04-10-2005, 08:45 PM
I started C++! - by Sterling Christensen - 04-10-2005, 09:42 PM
Re: I started C++! - by SJ Zero - 04-10-2005, 10:12 PM
I started C++! - by seph - 04-10-2005, 10:18 PM
I started C++! - by Anonymous - 04-11-2005, 05:07 AM
I started C++! - by relsoft - 04-11-2005, 01:25 PM
I started C++! - by NovaProgramming - 04-12-2005, 05:01 PM
I started C++! - by adosorken - 04-12-2005, 05:07 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)