Draft Notice - KEYWORD PAGES Edit

Okay, folks, this is a carbon copy from the old project's bload, which is a carbon copy of lillo's excellent documentation. I tried to keep it as simple as possible, but the attributes really should go into a table. Before I spent a long time diddling with a table format. I could try and copy that table format over and mess with mediawiki's templating routines, but that would make it all the harder to export. Opinions are welcome, as are alternative suggestions. -- END DRAFT NOTICE ---

BLOAD graphics statement Edit

Loads a block of binary data or a .bmp image from a file.

Usage Edit

   BLOAD filename[, address]

Not quite sure how to do the attribute table that goes here

Details Edit

BLOAD is used to load a saved block of binary data, and can be also used to load raw pixel data to the screen; if the addr argument is not specified, or it is set to 0, the data will be treated as pixel data and loaded into the current work page.

Below: How should code examples be formatted? BLOAD "image.bsv", 0 is in fact equivalent to:

BLOAD "image.bsv", SCREENPTR


<p> The pixel data stored in the file is the same pixel format as the one used by the current video mode; (see appendix C for details). </p>

<p> BLOAD can also be used to load BMP files in FreeBasic; when this is the case, if addr is zero, the BMP will be loaded on the screen; otherwise it'll be loaded in GET/PUT format into the specified addr address. In both cases the BMP pixel data will be converted to the current pixel format, and if the BMP has an associated palette this will be loaded and set as current palette. </p>

<p> Loading a BMP will fail if a screen mode was not previously set, or if the image is a truecolor bitmap and the current gfx mode is a paletted mode. </p>

Examples Edit

‘ --Example 1: Loading a BMP image with BLOAD--
‘ This example demonstrates using BLOAD with PUT to
‘ load a BMP image to an array and display it with PUT.
DIM image(64004) AS UBYTE
BLOAD "image.bmp", VARPTR(image(0))
PUT (0,0), image

Related Links Edit