Determine an Image

Determine an Image

Postby Silvio.Falconi » Tue Jan 09, 2018 12:10 pm

How can you determine an image file from another not-image?
In my app I must declare all images extension ?
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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Determine an Image

Postby nageswaragunupudi » Tue Jan 09, 2018 7:34 pm

? IsFileImageType( cFile )
This works only for the image types that FWH can display without freeimage.dll
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Determine an Image

Postby Silvio.Falconi » Tue Jan 09, 2018 9:12 pm

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
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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 101 guests