08-07-2007, 04:12 AM
im getting an error when trying to use your function LoadImageAnyFormat
call function LoadImageAnyFormat:
function LoadImageAnyFormat:
error output:
error line:
im using Windows Vista and my QM is Version 2.2.0.11 with up to date system folder
call function LoadImageAnyFormat:
str sPath = "D:\Downloads\Compressed\1920 x 1200 collection\accelerator1920.jpg"
int b=LoadImageAnyFormat(sPath)
function LoadImageAnyFormat:
;/
function# $_file
;Loads image of bmp, gif, jpg or other supported type.
;Returns bitmap handle. Later you must free it with DeleteObject.
typelib GflAx {059321F1-207A-47A7-93A1-29CDF876FDD3} 1.0 1
dll user32 #CopyImage handle un1 n1 n2 un2
str s.searchpath(_file)
if(!s.len) end "file does not exist"
if(s.endi(".bmp")) ret LoadImage(0 s IMAGE_BITMAP 0 0 LR_LOADFROMFILE)
GflAx.GflAx g._create
g.EnableLZW=TRUE ;;needed for gif
g.LoadBitmap(s)
stdole.IPicture p=g.GetPicture
ret CopyImage(p.Handle IMAGE_BITMAP g.width g.height 0)
error output:
error line:
im using Windows Vista and my QM is Version 2.2.0.11 with up to date system folder