bmap_format (BMAP*)
Returns the texture format of a bitmap.
Parameters:
Returns:
Texture format code, see bmap_lock.
Speed:
Fast
Example:
// adapt a bitmap's size to the screen size
BMAP* bmap_adapt(BMAP* bmap,var factor)
{
var size_x = screen_size.x*factor;
var size_y = screen_size.y*factor;
if (bmap && (bmap_width(bmap) != size_x || bmap_height(bmap) != size_y))
{
format = bmap_format(bmap);
ptr_remove(bmap);
bmap = bmap_createblack(size_x,size_y,format);
}
return bmap;
}
See also:
bmap_lock, bmap_width, bmap_height, bmap_to_format
► latest version online