Re: Win32Lib - Bitmap's Size

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tue, 3 Oct 2000 12:52:38 -0700, Caballero Rojo wrote:

>Hi all,
>     I just wanted to know how I get the size from a bitmap file
>without drawing it.

No problem:  you can use 'loadBitmapFromFile' to get the handle then
use 'getSize' or 'getExtent' to get the dimensions (I assume that's what
you mean by "size").

Example:

atom bmp
sequence bmp_size, bmp_extent

bmp = loadBitmapFromFile( "mybitmap.bmp" )

bmp_size = getSize( bmp )   -- returns {0,0,width,height}
bmp_extent = get_extent( bmp ) -- returns {width,height}


>Or maybe a procedure to move a bitmap?

You could use a bitmap control, put your bitmap into it, then move the
control.  Or you could 'copyBlt' your bitmap wherever you'd like...

-- Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu