Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image manipulation
#4
im getting an error when trying to use your function LoadImageAnyFormat

call function LoadImageAnyFormat:
Code:
Copy      Help
str sPath  =  "D:\Downloads\Compressed\1920 x 1200 collection\accelerator1920.jpg"
int b=LoadImageAnyFormat(sPath)


function LoadImageAnyFormat:
Code:
Copy      Help
;/
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:
Code:
Copy      Help
Error in LoadImageAnyFormat:  cannot load type library.

error line:
Code:
Copy      Help
typelib GflAx {059321F1-207A-47A7-93A1-29CDF876FDD3} 1.0 1

im using Windows Vista and my QM is Version 2.2.0.11 with up to date system folder


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)