Archive: get size of a image


get the pixel size of a image
i have searched all the avaialble documents
but haven't got an answer

is there a way i can get the size of a bmp image?

i want do display a arbitrary image on a custom page
but i don't want it to be distorted if the width and height does not fit

for the iamge i have used this

System::Call "user32::LoadImage(i 0, t '$R0', i 0, i 310, i 180, i ${LR_LOADFROMFILE}) i.s"


or is there any other way to load images?
i have tried the ebanner plugin but didn't worked for me because i was not able to get it in the desired area of the screen ... it just poped up on the background

this was the code:
ReadINIStr $ctrlhandle "$PLUGINSDIR\select_skin.ini" "Field 2" "HWND"
; ebanner::show /NOUNLOAD /HALIGN=CENTER /VALIGN=CENTER /HWND=$ctrlhandle /FIT=BOTH "$R0"


System::Alloc 24
Pop $R0
System::Call `user32::LoadImage(i 0, t "path\file.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.R1`
System::Call `gdi32::GetObject(i R1, i 24, i R0)`
System::Call `*$R0(i, i .R1, i .R2, i, i, i, i)`
System::Call `gdi32::DeleteObject(i R1)`
System::Free $R0

MessageBox MB_OK "$R1 $R2"


Edit: Added call to DeleteObject.

-Stu

thanx, it worked


sorry, posted reply by mistake