Qbasicnews.com
Angelo: What's the format of a PUT buffer? - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: General (http://qbasicnews.com/newforum/forum-6.html)
+--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html)
+--- Thread: Angelo: What's the format of a PUT buffer? (/thread-5964.html)

Pages: 1 2


Angelo: What's the format of a PUT buffer? - Antoni Gual - 02-07-2005

Quote:PUT can be used to draw images previously saved by the GET statement.
Could you publish the format of the PUT buffer so it could be built by an user program avoiding drawing to screen and using GET?


Angelo: What's the format of a PUT buffer? - na_th_an - 02-07-2005

I guess it is:

Code:
width   4 bytes (32 bits integer)
height  4 bytes (32 bits integer)
raw image (width * height * bytesperpixel bytes)

So if you are working in an 8 bpp mode, you will have just one integer for width, another one for height and then width * height bytes with the image stored in row-order.

This is just a guess, anyways.


Angelo: What's the format of a PUT buffer? - Sterling Christensen - 02-07-2005

Nope, it's QB compatible.

Code:
width * 8   2 bytes (16 bit unsigned short)
height      2 bytes (16 bit unsigned short)
raw image   (width * height * bytesPerPixel bytes)



Angelo: What's the format of a PUT buffer? - lillo - 02-07-2005

What Sterling said. Please pay attention that the raw image data is in bytes per pixel, that is, even if you're using SCREEN 1 which is 2bit per pixel, each pixel will take a whole byte into the image.
Also refer to the gfxlib.txt documentation on GET and appendix C for details on the internal pixel formats.


Angelo: What's the format of a PUT buffer? - Antoni Gual - 02-07-2005

This means all QB mode 13 sprites can be reused in FB mode 13 without a change!!!


Angelo: What's the format of a PUT buffer? - lillo - 02-07-2005

Exactly. You also got BLOAD that is completely compatible with QB BSAVEd SCREEN 13 images. FB version of BSAVE creates files that are incompatible with QB though - of course FB BLOAD will be able to load both QB and FB BSAVEd blocks.


Angelo: What's the format of a PUT buffer? - na_th_an - 02-08-2005

Quote:Exactly. You also got BLOAD that is completely compatible with QB BSAVEd SCREEN 13 images. FB version of BSAVE creates files that are incompatible with QB though - of course FB BLOAD will be able to load both QB and FB BSAVEd blocks.

That's awesome Big Grin

(note to self: learn to RTFM)


Angelo: What's the format of a PUT buffer? - relsoft - 02-09-2005

Quote:This means all QB mode 13 sprites can be reused in FB mode 13 without a change!!!

Porting my scroller took 10 mins. :*)


Angelo: What's the format of a PUT buffer? - dumbledore - 02-11-2005

can screen 12 qb bsave'd images be bloaded via fb too?


Angelo: What's the format of a PUT buffer? - Sterling Christensen - 02-11-2005

Quote:can screen 12 qb bsave'd images be bloaded via fb too?
Sort of... you'd be able to bload them, but you won't be able to PUT them because FB's screen 12 is 8 bits per pixel, while a screen 12 qb bsave'd image will be 4 bits per pixel.