the 5th parameter of is cGetFile() is lsave ....
How I can save an Image and select a format to save ( from final user) with cGetFile()
sample :
- Code: Select all Expand view
#define FIF_UNKNOWN -1
#define FIF_BMP 0
#define FIF_ICO 1
#define FIF_JPEG 2
#define FIF_JNG 3
#define FIF_KOALA 4
#define FIF_LBM 5
#define FIF_IFF FIF_LBM
#define FIF_MNG 6
#define FIF_PBM 7
#define FIF_PBMRAW 8
#define FIF_PCD 9
#define FIF_PCX 10
#define FIF_PGM 11
#define FIF_PGMRAW 12
#define FIF_PNG 13
#define FIF_PPM 14
#define FIF_PPMRAW 15
#define FIF_RAS 16
#define FIF_TARGA 17
#define FIF_TIFF 18
#define FIF_WBMP 19
#define FIF_PSD 20
#define FIF_CUT 21
#define FIF_XBM 22
#define FIF_XPM 23
#define FIF_DDS 24
#define FIF_GIF 25
#define FIF_HDR 26
#define FIF_FAXG3 27
#define FIF_SGI 28
STATIC FUNCTION SalvaImage(oImage)
local cFile := cGetFile( "Bitmap (*.bmp)| *.bmp|" + ;
"DIB (*.dib)| *.dib|" + ;
"PCX (*.pcx)| *.pcx|" + ;
"JPEG (*.jpg)| *.jpg|" + ;
"GIF (*.gif)| *.gif|" + ;
"TARGA (*.tga)| *.tga|" + ;
"RLE (*.rle)| *.rle|" + ;
"All Files (*.*)| *.*" ;
,"Salva con il nome", CurDir(), .t. )
* if ! Empty( cFile ) .and. File( cFile )
* Return cFile
* End
nFormat:= 2
nFlag := 25
oImage:SaveImage( cFile, nFormat, nFlag )
MsgInfo( "saved as"+ cFile)
RETURN NIL