VFP中图片转换
请老师指点 我在网上找的下面这段代码怎么使用Function saveimage2(openfile as String,savefile as string)
lqEncoderClsID_BMP=0h00F47C55041AD3119A730000F81EF32E &&BMP
lqEncoderClsID_JPG=0h01F47C55041AD3119A730000F81EF32E &&JPG
lqEncoderClsID_GIF=0h02F47C55041AD3119A730000F81EF32E &&GIF
lqEncoderClsID_TIF=0h05F47C55041AD3119A730000F81EF32E &&TIF
lqEncoderClsID_PNG=0h06F47C55041AD3119A730000F81EF32E &&PNG
DECLARE Long GdipLoadImageFromFile IN Gdiplus.dll String cFile, Long @ nativeImage
DECLARE Long GdipSaveImageToFile IN Gdiplus.dll Long nativeImage, String cFile, ;
String EncoderClsID, String EncoderParameters
DECLARE Long GdipDisposeImage IN Gdiplus.dll Long nativeImage
lcInputFile=STRCONV(openfile+CHR(0),5)
lcOutputFile=STRCONV(savefile+CHR(0),5)
lnImage=0
GdipLoadImageFromFile(lcInputFile,@lnImage)
GdipSaveImageToFile(lnImage, lcOutputFile, EVALUATE('lqEncoderClsID_'+UPPER(JUSTEXT(savefile))), NULL)
GdipDisposeImage(lnImage)
ERASE &openfile
Endfunc