Blog: Tech Talk

agsdix-fas fa-home

Blog: Home

agsdix-fas fa-pen-fancy

Blog: CEO's Corner

agsdix-fas fa-code

Blog: Tech Talk

Blog: Product Releases

agsdix-fas fa-chalkboard-teacher

Blog: Viewing

Blog: Conversion

arrow left circle icon Blog: Tech Talk

Identifying Unknown File Formats

by | Apr 24, 2012

Do you have a file and you are not sure what type it is? This article explains how you can get RasterMaster to identify it for you. RasterMaster can recognize and process a wide variety of file formats. You do not have to tell RasterMaster what the format is. Unlike Windows which relies on someone naming the file correctly, RasterMaster uses the data in the file to identify the file type, even if the file has a misleading filename extension.

You can use the IMGLOW_get_filetype() method to identify an unknown file format. This method returns a file type number that corresponds to a file type defined in the RasterMaster library. Please see the list of file type constants below.

Use the following link to see a description of the IMGLOW_get_filetype() method: Java manual/WebHelp/Content/chsnowbndmethods.htm#TOC_IMGLOW_get_filetype

Use the following link to see a list of the file type constants: Java manual/WebHelp/Content/chsnowbndmethods.htm#TOC_IMGLOW_get_filetype


This method returns the file type of an image.


int IMGLOW_get_filetype (String filename);

Note: This method can also be called using DataInputStream. Use the following syntax:

int IMGLOW_get_filetype (DataInputStream dis);


The table below lists the IMGLOW_get_filetype(String) method variable descriptions.

Variable Description 
filenameFile name and path to an image.


Returns the file type number corresponding to a file type defined in the RasterMaster library. Any value less than zero is a Snowbound error code.

File Type Constants

The table below lists the file type constants.

Description File Type 
 AFP 74
 CALS 18
 CCITT_G3 33
 CCITT_G4 34
 CFF 83
 CIFF 81
 CIMS 80
 CLIP 27
 COD 72
 CUT 31
 DCS 62
 DCX 11
 DIB 48
 DOC 86
 DWG 90
 DXF 91
 EPS 14
 GIF 4
 GX2 22
 HTML 82
 IMG 28
 IOCA 24
 JBIG 71
 JBIG2000 77
 JPEG 13
 JPEG2000 70
 MAG 61
 MSP 30
 NCR 65
 PCL_1 57
 PCL_5 76
 PCX 2
 PDF 59
 PDF_15 79
 PDF_16 92
 PICT 15
 PNG 43
 RAST 37
 RTF 87
 TARGA16 32
 TIFF_2D 17
 WBMP 68
 WMF 6
 WPG 5
 XBM 20
 XLS 84
 Xerox_EPS 45
 XPM 35
 XWD 36