FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Determine an Image
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Determine an Image
Posted: 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 March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Determine an Image
Posted: Tue Jan 09, 2018 07:34 PM

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

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Determine an Image
Posted: Tue Jan 09, 2018 09: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 March-April 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

Continue the discussion