Page 1 of 1

Determine an Image

PostPosted: Tue Jan 09, 2018 12:10 pm
by Silvio.Falconi
How can you determine an image file from another not-image?
In my app I must declare all images extension ?

Re: Determine an Image

PostPosted: Tue Jan 09, 2018 7:34 pm
by nageswaragunupudi
? IsFileImageType( cFile )
This works only for the image types that FWH can display without freeimage.dll

Re: Determine an Image

PostPosted: Tue Jan 09, 2018 9:12 pm
by Silvio.Falconi
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