What are the image creation flags?

BlitzMax Forums/BlitzMax Programming/What are the image creation flags?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

An area of storage which describe the pixels of an image.
From the doc...
Pixmaps
Pixmaps provide storage for rectangular regions of pixels.

You can create a new pixmap using the CreatePixmap command, or load a pixmap from a stream using LoadPixmap.

Pixmaps have 5 properties: width, height, a byte pointer to the pixmap's pixels, pitch and format.

You can retrieve a pointer to a pixmap's pixels using the PixmapPixelPtr command.

A pixmap's pitch refers to the number of bytes between one row of pixels in the pixmap and the next. To retrieve a pixmap's pitch, use the PixmapPitch command.

A pixmap's pixel format determines how the pixels within a pixmap are stored in memory. This must be taken into account if you want to access pixels directly via a pixmap's pixel pointer. You can retrieve the format of a pixmap using the PixmapFormat command, and convert pixmap's from one format to another using ConvertPixmap.

You can also resize a pixmap, flip a pixmap horizontally or vertically and more. 


Everything in Bmax is loaded as a pixmap (even images).
When you drawimage for the first time the pixmap information is used to create a textured surface. This and subsequent drawimages blit that surface to the backbuffer.