Identifying Unknown File Formats

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:

http://rastermaster.com/RasterMaster Java manual/WebHelp/Content/chsnowbndmethods.htm#TOC_IMGLOW_get_filetype

Use the following link to see a list of the file type constants:

http://rastermaster.com/RasterMaster Java manual/WebHelp/Content/chsnowbndmethods.htm#TOC_IMGLOW_get_filetype

 IMGLOW_get_filetype(String)

This method returns the file type of an image.

Syntax

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);

Remark

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

Variable  Description 
 filename    File name and path to an image.
 
   

Returns

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
 ASCII  38
 BMP_COMPRESSED  12
 BMP_UNCOMPRESSED  1
 BROOK_TROUT  29
 CALS  18
 CCITT_G3  33
 CCITT_G3_FO  53
 CCITT_G4  34
 CCITT_G4_FO  52
 CFF  83
 CIFF  81
 CIMS  80
 CLIP  27
 COD  72
 CUT  31
 DCS  62
 DCX  11
 DIB  48
 DICOM  55
 DOC  86
 DWG  90
 DXF  91
 EMAIL  89
 EPS  14
 EPS_BITMAP  63
 EPS_BITMAP_G4  64
 EPS_BITMAP_LZW  69
 EXCEL  84
 FILENET  78
 FLASHPIX  54
 GIF  4
 GIF_INTERLACED  44
 GX2  22
 HTML  82
 ICONTYPE  25
 IFF_ILBM  26
 IMG  28
 IMNET  42
 IOCA  24
 JBIG  71
 JBIG2000  77
 JPEG  13
 JPEG2000  70
 KOFAX  23
 LASER_DATA  19
 LINE_DATA  75
 MACPAINT  21
 MAG  61
 MO:DCA_IOCA  49
 MSP  30
 NCR  65
 PCL_1  57
 PCL_5  76
 PCX  2
 PDF  59
 PDF_15  79
 PDF_16  92
 PHOTOCD  39
 PHOTOSHOP  41
 PICT  15
 PNG  43
 RAST  37
 RTF  87
 SCITEX  60
 TARGA  3
 TARGA16  32
 TIFF_2D  17
 TIFF_ABIC  46
 TIFF_ABIC_BW  47
 TIFF_G3_FAX  8
 TIFF_G4_FAX  10
 TIFF_G4_FAX_FO  51
 TIFF_G4_FAX_STRIP  67
 TIFF_HUFFMAN  7
 TIFF_JBIG  66
 TIFF_JPEG  40
 TIFF_JPEG7  73
 TIFF_LZW
 TIFF_PACK  16
 TIFF_UNCOMPRESSED  0
 WBMP  68
 WINFAX  58
 WMF  6
 WPG  5
 XBM  20
 XLS  84
 Xerox_EPS  45
 XPM  35
 XWD  36
 
   

 

Category:

Online Demo