you can tell if a file is an image file ?
I need it because when I drop a file the procedure must Know if the file past is a image file or not
On old procedure I made a control on type of extension for some files type
IF UPPER( RIGHT( cFile, 3 ) ) == "JPG" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "BMP" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "PCX" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "GIF" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "TGA" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "RLE" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "PNG" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "DIB"
But the type of file image are many and many other
I need all image Freeimage Know
I saw there is a function on Image class
IsImageData( cBuf )
How use it ? or is there a api function to Know it ?
Know if is an image file
- Silvio.Falconi
- Posts: 7141
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Know if is an image file
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: Know if is an image file
Silvio,
You can get the file-extensions using :
cFileExt()
Retrieves the extension from a filename
Syntax:
cFileExt( <cFileName> ) --> cExtName
Parameters:
<cFileName> The filename whose extension to retrieve,
if the extension has been specified inside its filename.
Returns:
<cExtName> A three characters string with the extension name.
Source Code:
SOURCE\FUNCTION\FileName.prg
FREEIMAGE supports the following formats :
BMP, ICO, JPEG, JNG, KOALA, LBM, IFF = FIF_LBM
MNG, PBM, PBMRAW, PCD, PCX, PGM, PGMRAW
PNG, PPM, PPMRAW, RAS, TARGA,TIFF, WBMP
PSD, CUT, XBM, XPM, DDS, GIF, HDR, FAXG3
SGI, EXR, JP2
best regards
Uwe
You can get the file-extensions using :
cFileExt()
Retrieves the extension from a filename
Syntax:
cFileExt( <cFileName> ) --> cExtName
Parameters:
<cFileName> The filename whose extension to retrieve,
if the extension has been specified inside its filename.
Returns:
<cExtName> A three characters string with the extension name.
Source Code:
SOURCE\FUNCTION\FileName.prg
FREEIMAGE supports the following formats :
BMP, ICO, JPEG, JNG, KOALA, LBM, IFF = FIF_LBM
MNG, PBM, PBMRAW, PCD, PCX, PGM, PGMRAW
PNG, PPM, PPMRAW, RAS, TARGA,TIFF, WBMP
PSD, CUT, XBM, XPM, DDS, GIF, HDR, FAXG3
SGI, EXR, JP2
best regards
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Silvio.Falconi
- Posts: 7141
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: Know if is an image file
thanks Uwe,
I need this for the application I am creating software for electronic archiving and electronic storage of documents
Through management of colored binders for topics you can keep under control all office document or the household bills, receipts, contracts, etc. by storing them in files that can be viewed or printed
Ithnked to save image files, office and OpenOffice , Adobe Pdf documents
I need this for the application I am creating software for electronic archiving and electronic storage of documents
Through management of colored binders for topics you can keep under control all office document or the household bills, receipts, contracts, etc. by storing them in files that can be viewed or printed
Ithnked to save image files, office and OpenOffice , Adobe Pdf documents
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com