How can you determine an image file from another not-image?
In my app I must declare all images extension ?
Determine an Image
- Silvio.Falconi
- Posts: 7141
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Determine an Image
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
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Determine an Image
? IsFileImageType( cFile )
This works only for the image types that FWH can display without freeimage.dll
This works only for the image types that FWH can display without freeimage.dll
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7141
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: Determine an Image
I try with some image files and it return true only fot these files
png
bmp
emf
gif
jpg
tif
return false with these files
pbm
pcx
tga
Now I add these lines
IF UPPER( RIGHT( cFile, 3 ) ) == "TGA";
.OR. UPPER( RIGHT( cFile, 3 ) ) == "PCX" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "PBM"
lFileImage:=.t.
ENDIF
and with freeimage I can show pcx tga but cannot show pbm
png
bmp
emf
gif
jpg
tif
return false with these files
pbm
pcx
tga
Now I add these lines
IF UPPER( RIGHT( cFile, 3 ) ) == "TGA";
.OR. UPPER( RIGHT( cFile, 3 ) ) == "PCX" ;
.OR. UPPER( RIGHT( cFile, 3 ) ) == "PBM"
lFileImage:=.t.
ENDIF
and with freeimage I can show pcx tga but cannot show pbm
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