Class ImageType
Allows to classify the ImageType
of an InputStream
via ImageType(InputStream)
or to simply define one ImageType
via ImageType(String)
.
- Since:
- 2.3.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal byte[]
The optionally read header of sizeMAGIC_MAX_SIZE
bytes as used to determine thetype
, i.e.static final int
Minimum number of bytes to determine the image data type, i.e.static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "3d2".static final String
Constant which can be used as a file suffix to indicate an Apple QuickDraw 3D 3DMF stream, value "3dmf".static final String
Constant which can be used as a file suffix to indicate a Texas Instruments TI-92 Bitmap stream, value "92i".static final String
Constant which can be used as a file suffix to indicate an Amiga metafile stream, value "amff".static final String
Constant which can be used as a file suffix to indicate an America Online Art stream, value "art".static final String
Constant which can be used as a file suffix to indicate a GIF stream, value "bmp".static final String
Constant which can be used as a file suffix to indicate a United States Department of Defence Continuous Acquisition and Life-cycle Support Raster stream, value "cals".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "cam".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "cbd".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "ce2".static final String
Constant which can be used as a file suffix to indicate a Kodak Cineon System stream, value "cin".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "cob".static final String
Constant which can be used as a file suffix to indicate a Corel Photo Paint stream, value "cpt".static final String
Constant which can be used as a file suffix to indicate a Microsoft Windows Cursor stream, value "cur".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "cvg".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "dcx".static final String
Constant which can be used as a file suffix to indicate a DirectDraw Surface stream, value "dds".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "dem".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "dib".static final String
Constant which can be used as a file suffix to indicate a Digital Picture Exchange stream, value "dpx".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "drw".static final String
Constant which can be used as a file suffix to indicate a Autocad drawing stream, value "dwg".static final String
Constant which can be used as a file suffix to indicate a Hexagon Geospatial Enhanced Compression Wavelet stream, value "ecw".static final String
Constant which can be used as a file suffix to indicate a Microsoft Windows Enhanced metafile stream, value "emf".static final String
Constant which can be used as a file suffix to indicate a FlashPix stream, value "fpx".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "fts".static final String
Constant which can be used as a file suffix to indicate a GIF stream, value "gif".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "gro".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "hdr".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "hru".static final String
Constant which can be used as a file suffix to indicate an Apple Icon Image stream, value "icns".static final String
Constant which can be used as a file suffix to indicate a Microsoft Windows Icon stream, value "ico".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "img".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "infini-d".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "iwc".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "j6i".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "jif".static final String
Constant which can be used as a file suffix to indicate a JPEG-2000 stream, value "jp2".static final String
Constant which can be used as a file suffix to indicate a JPEG stream, value "jpg".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "kdc".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "l64".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "lbm".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "ldf".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "lwf".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "mbm".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "mgl".static final String
Constant which can be used as a file suffix to indicate an Imagemagick stream, value "mif".static final String
Constant which can be used as a file suffix to indicate a Multiple-image Network Graphics stream, value "mng".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "mpw".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "msp".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "n64".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "ncr".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "nff".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "ngg".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "nlm".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "nol".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pal".static final String
Constant which can be used as a file suffix to indicate a Portable Arbitrary Map stream, NetPbm magic 7 - binary RGB and RGBA.static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pax".static final String
Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 4 - binary monochrome.static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pcd".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pcl".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pcx".static final String
Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 5 - binary grayscale.static final String
Constant which can be used as a file suffix to indicate a Softimage pic stream, value "pic".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pix".static final String
Constant which can be used as a file suffix to indicate a PNG stream, value "png".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "pol".static final String
Constant which can be used as a file suffix to indicate a PAM stream, NetPbm magic 6 - binary RGB.static final String
Constant which can be used as a file suffix to indicate a Adobe PhotoShop stream, value "psd".static final String
Constant which can be used as a file suffix to indicate a PaintShop Pro stream, value "psp".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "qfx".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "qtm".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "rad".static final String
Constant which can be used as a file suffix to indicate a Sun Raster stream, value "ras".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "rix".static final String
Constant which can be used as a file suffix to indicate an SGI RGB stream, value "rgb".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "sid".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "sld".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "sod".static final String
Constant which can be used as a file suffix to indicate a Targa stream, value "tga".static final String
Constant which can be used as a file suffix to indicate a TIFF stream, value "tiff".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "wic".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "wlm".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "wmf".static final String
Constant which can be used as a file suffix to indicate a Wordperfect Graphics vectors stream, value "wpg".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "wrl".static final String
Constant which can be used as a file suffix to indicate aTBD
stream, value "xbm".static final String
Constant which can be used as a file suffix to indicate a X PixMap stream, value "xpm".final String
The determined unique type, e.g. -
Constructor Summary
ConstructorsConstructorDescriptionImageType
(InputStream stream) Creates instance based on given stream.Creates instance based on the given type. -
Method Summary
-
Field Details
-
MAGIC_MAX_SIZE
public static final int MAGIC_MAX_SIZEMinimum number of bytes to determine the image data type, i.e. 25 bytes.- See Also:
-
T_JPG
Constant which can be used as a file suffix to indicate a JPEG stream, value "jpg".http://www.faqs.org/faqs/jpeg-faq/part1/
http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=54989
- See Also:
-
T_PNG
Constant which can be used as a file suffix to indicate a PNG stream, value "png".http://www.libpng.org/pub/png/spec/1.1/PNG-Rationale.html#R.PNG-file-signature
- See Also:
-
T_ICNS
Constant which can be used as a file suffix to indicate an Apple Icon Image stream, value "icns".'i' 'c' 'n' 's' ascii code
TODO
- See Also:
-
T_ICO
Constant which can be used as a file suffix to indicate a Microsoft Windows Icon stream, value "ico".TODO
https://msdn.microsoft.com/en-us/library/ms997538.aspx
- See Also:
-
T_CUR
Constant which can be used as a file suffix to indicate a Microsoft Windows Cursor stream, value "cur".TODO
TODO
- See Also:
-
T_GIF
Constant which can be used as a file suffix to indicate a GIF stream, value "gif".GIF87A or GIF89A ascii code
http://www.w3.org/Graphics/GIF/spec-gif87a.txt http://www.w3.org/Graphics/GIF/spec-gif89a.txt
- See Also:
-
T_BMP
Constant which can be used as a file suffix to indicate a GIF stream, value "bmp".BM ascii code
FIXME: Collision or supertype of
T_DIB
?http://www.fileformat.info/format/bmp/spec/e27073c25463436f8a64fa789c886d9c/view.htm
- See Also:
-
T_DIB
Constant which can be used as a file suffix to indicate aTBD
stream, value "dib".FIXME: Collision or subtype of
T_BMP
?TODO
- See Also:
-
T_DCX
Constant which can be used as a file suffix to indicate aTBD
stream, value "dcx".TODO
TODO
- See Also:
-
T_PCX
Constant which can be used as a file suffix to indicate aTBD
stream, value "pcx".TODO
TODO
- See Also:
-
T_PPM
Constant which can be used as a file suffix to indicate a PAM stream, NetPbm magic 6 - binary RGB.http://netpbm.sourceforge.net/doc/ppm.html
- See Also:
-
T_PSD
Constant which can be used as a file suffix to indicate a Adobe PhotoShop stream, value "psd".TODO
TODO
- See Also:
-
T_TIFF
Constant which can be used as a file suffix to indicate a TIFF stream, value "tiff".Intentionally detects only the little endian tiff images ("II" in the spec).
FIXME: Collision or supertype of
T_LDF
?http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
- See Also:
-
T_LDF
Constant which can be used as a file suffix to indicate aTBD
stream, value "ldf".FIXME: Collision or subtype of
T_TIFF
?TODO
- See Also:
-
T_SGI_RGB
Constant which can be used as a file suffix to indicate an SGI RGB stream, value "rgb"."474 saved as a short" 474 = 0x01DA
http://paulbourke.net/dataformats/sgirgb/sgiversion.html
- See Also:
-
T_DDS
Constant which can be used as a file suffix to indicate a DirectDraw Surface stream, value "dds".'D' 'D' 'S' ' ' ascii code
https://msdn.microsoft.com/en-us/library/windows/desktop/bb943991%28v=vs.85%29.aspx#File_Layout1
- See Also:
-
T_PAM
Constant which can be used as a file suffix to indicate a Portable Arbitrary Map stream, NetPbm magic 7 - binary RGB and RGBA.http://netpbm.sourceforge.net/doc/pam.html
- See Also:
-
T_PGM
Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 5 - binary grayscale.http://netpbm.sourceforge.net/doc/pgm.html
- See Also:
-
T_PBM
Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 4 - binary monochrome.http://netpbm.sourceforge.net/doc/pbm.html
- See Also:
-
T_3D2
Constant which can be used as a file suffix to indicate aTBD
stream, value "3d2".TODO
TODO
- See Also:
-
T_3DMF
Constant which can be used as a file suffix to indicate an Apple QuickDraw 3D 3DMF stream, value "3dmf".TODO
TODO
- See Also:
-
T_92I
Constant which can be used as a file suffix to indicate a Texas Instruments TI-92 Bitmap stream, value "92i".TODO
TODO
- See Also:
-
T_AMFF
Constant which can be used as a file suffix to indicate an Amiga metafile stream, value "amff".TODO
TODO
- See Also:
-
T_ART
Constant which can be used as a file suffix to indicate an America Online Art stream, value "art".TODO
TODO
- See Also:
-
T_CALS
Constant which can be used as a file suffix to indicate a United States Department of Defence Continuous Acquisition and Life-cycle Support Raster stream, value "cals".TODO
http://www.fileformat.info/format/cals/egff.htm
- See Also:
-
T_CAM
Constant which can be used as a file suffix to indicate aTBD
stream, value "cam".TODO
TODO
- See Also:
-
T_CBD
Constant which can be used as a file suffix to indicate aTBD
stream, value "cbd".TODO
TODO
- See Also:
-
T_CE2
Constant which can be used as a file suffix to indicate aTBD
stream, value "ce2".TODO
TODO
- See Also:
-
T_CIN
Constant which can be used as a file suffix to indicate a Kodak Cineon System stream, value "cin".TODO
http://www.cineon.com/ff_draft.php
- See Also:
-
T_COB
Constant which can be used as a file suffix to indicate aTBD
stream, value "cob".TODO
TODO
- See Also:
-
T_CPT
Constant which can be used as a file suffix to indicate a Corel Photo Paint stream, value "cpt".TODO
TODO
- See Also:
-
T_CVG
Constant which can be used as a file suffix to indicate aTBD
stream, value "cvg".TODO
TODO
- See Also:
-
T_DEM
Constant which can be used as a file suffix to indicate aTBD
stream, value "dem".TODO
TODO
- See Also:
-
T_DPX
Constant which can be used as a file suffix to indicate a Digital Picture Exchange stream, value "dpx".TODO
TODO
- See Also:
-
T_DRW
Constant which can be used as a file suffix to indicate aTBD
stream, value "drw".TODO
TODO
- See Also:
-
T_DWG
Constant which can be used as a file suffix to indicate a Autocad drawing stream, value "dwg".TODO
TODO
- See Also:
-
T_ECW
Constant which can be used as a file suffix to indicate a Hexagon Geospatial Enhanced Compression Wavelet stream, value "ecw".TODO
TODO
- See Also:
-
T_EMF
Constant which can be used as a file suffix to indicate a Microsoft Windows Enhanced metafile stream, value "emf".TODO
TODO
- See Also:
-
T_FPX
Constant which can be used as a file suffix to indicate a FlashPix stream, value "fpx".TODO
TODO
- See Also:
-
T_FTS
Constant which can be used as a file suffix to indicate aTBD
stream, value "fts".TODO
TODO
- See Also:
-
T_GRO
Constant which can be used as a file suffix to indicate aTBD
stream, value "gro".TODO
TODO
- See Also:
-
T_HDR
Constant which can be used as a file suffix to indicate aTBD
stream, value "hdr".TODO
TODO
- See Also:
-
T_HRU
Constant which can be used as a file suffix to indicate aTBD
stream, value "hru".TODO
TODO
- See Also:
-
T_IMG
Constant which can be used as a file suffix to indicate aTBD
stream, value "img".TODO
TODO
- See Also:
-
T_INFINI_D
Constant which can be used as a file suffix to indicate aTBD
stream, value "infini-d".TODO
TODO
- See Also:
-
T_IWC
Constant which can be used as a file suffix to indicate aTBD
stream, value "iwc".TODO
TODO
- See Also:
-
T_J6I
Constant which can be used as a file suffix to indicate aTBD
stream, value "j6i".TODO
TODO
- See Also:
-
T_JIF
Constant which can be used as a file suffix to indicate aTBD
stream, value "jif".TODO
TODO
- See Also:
-
T_JP2
Constant which can be used as a file suffix to indicate a JPEG-2000 stream, value "jp2".TODO
TODO
- See Also:
-
T_KDC
Constant which can be used as a file suffix to indicate aTBD
stream, value "kdc".TODO
TODO
- See Also:
-
T_L64
Constant which can be used as a file suffix to indicate aTBD
stream, value "l64".TODO
TODO
- See Also:
-
T_LBM
Constant which can be used as a file suffix to indicate aTBD
stream, value "lbm".FIXME: Collision or supertype of
T_RAD
?TODO
- See Also:
-
T_RAD
Constant which can be used as a file suffix to indicate aTBD
stream, value "rad".FIXME: Collision or subtype of
T_LBM
?TODO
- See Also:
-
T_LWF
Constant which can be used as a file suffix to indicate aTBD
stream, value "lwf".TODO
TODO
- See Also:
-
T_MBM
Constant which can be used as a file suffix to indicate aTBD
stream, value "mbm".TODO
TODO
- See Also:
-
T_MGL
Constant which can be used as a file suffix to indicate aTBD
stream, value "mgl".TODO
TODO
- See Also:
-
T_MIF
Constant which can be used as a file suffix to indicate an Imagemagick stream, value "mif".TODO
TODO
- See Also:
-
T_MNG
Constant which can be used as a file suffix to indicate a Multiple-image Network Graphics stream, value "mng".TODO
TODO
- See Also:
-
T_MPW
Constant which can be used as a file suffix to indicate aTBD
stream, value "mpw".TODO
TODO
- See Also:
-
T_MSP
Constant which can be used as a file suffix to indicate aTBD
stream, value "msp".TODO
TODO
- See Also:
-
T_N64
Constant which can be used as a file suffix to indicate aTBD
stream, value "n64".TODO
TODO
- See Also:
-
T_NCR
Constant which can be used as a file suffix to indicate aTBD
stream, value "ncr".TODO
TODO
- See Also:
-
T_NFF
Constant which can be used as a file suffix to indicate aTBD
stream, value "nff".TODO
TODO
- See Also:
-
T_NGG
Constant which can be used as a file suffix to indicate aTBD
stream, value "ngg".TODO
TODO
- See Also:
-
T_NLM
Constant which can be used as a file suffix to indicate aTBD
stream, value "nlm".TODO
TODO
- See Also:
-
T_NOL
Constant which can be used as a file suffix to indicate aTBD
stream, value "nol".TODO
TODO
- See Also:
-
T_PAL
Constant which can be used as a file suffix to indicate aTBD
stream, value "pal".TODO
TODO
- See Also:
-
T_PAX
Constant which can be used as a file suffix to indicate aTBD
stream, value "pax".TODO
TODO
- See Also:
-
T_PCD
Constant which can be used as a file suffix to indicate aTBD
stream, value "pcd".TODO
TODO
- See Also:
-
T_PCL
Constant which can be used as a file suffix to indicate aTBD
stream, value "pcl".TODO
TODO
- See Also:
-
T_PIC
Constant which can be used as a file suffix to indicate a Softimage pic stream, value "pic".TODO
http://paulbourke.net/dataformats/softimagepic/
- See Also:
-
T_PIX
Constant which can be used as a file suffix to indicate aTBD
stream, value "pix".TODO
TODO
- See Also:
-
T_POL
Constant which can be used as a file suffix to indicate aTBD
stream, value "pol".TODO
TODO
- See Also:
-
T_PSP
Constant which can be used as a file suffix to indicate a PaintShop Pro stream, value "psp".TODO
TODO
- See Also:
-
T_QFX
Constant which can be used as a file suffix to indicate aTBD
stream, value "qfx".TODO
TODO
- See Also:
-
T_QTM
Constant which can be used as a file suffix to indicate aTBD
stream, value "qtm".TODO
TODO
- See Also:
-
T_RAS
Constant which can be used as a file suffix to indicate a Sun Raster stream, value "ras".TODO
TODO
- See Also:
-
T_RIX
Constant which can be used as a file suffix to indicate aTBD
stream, value "rix".TODO
TODO
- See Also:
-
T_SID
Constant which can be used as a file suffix to indicate aTBD
stream, value "sid".TODO
TODO
- See Also:
-
T_SLD
Constant which can be used as a file suffix to indicate aTBD
stream, value "sld".TODO
TODO
- See Also:
-
T_SOD
Constant which can be used as a file suffix to indicate aTBD
stream, value "sod".TODO
TODO
- See Also:
-
T_WIC
Constant which can be used as a file suffix to indicate aTBD
stream, value "wic".TODO
TODO
- See Also:
-
T_WLM
Constant which can be used as a file suffix to indicate aTBD
stream, value "wlm".TODO
TODO
- See Also:
-
T_WMF
Constant which can be used as a file suffix to indicate aTBD
stream, value "wmf".TODO
TODO
- See Also:
-
T_WPG
Constant which can be used as a file suffix to indicate a Wordperfect Graphics vectors stream, value "wpg".TODO
TODO
- See Also:
-
T_WRL
Constant which can be used as a file suffix to indicate aTBD
stream, value "wrl".TODO
TODO
- See Also:
-
T_XBM
Constant which can be used as a file suffix to indicate aTBD
stream, value "xbm".TODO
TODO
- See Also:
-
T_XPM
Constant which can be used as a file suffix to indicate a X PixMap stream, value "xpm".TODO
TODO
- See Also:
-
T_TGA
Constant which can be used as a file suffix to indicate a Targa stream, value "tga".- See Also:
-
type
The determined unique type, e.g.T_PNG
,T_JPG
, etc.Maybe
null
if undetermined, i.e.isDefined()
returnsfalse
. -
header
public final byte[] headerThe optionally read header of sizeMAGIC_MAX_SIZE
bytes as used to determine thetype
, i.e.ImageType(InputStream)
.May be
null
, iftype
has been determined otherwise, i.eImageType(String)
.The header is not being used for
hashCode()
andequals(Object)
!
-
-
Constructor Details
-
ImageType
Creates instance based on given stream.- Parameters:
stream
- stream to parse,InputStream.available()
must be ≥MAGIC_MAX_SIZE
- Throws:
IOException
- if an I/O exception occurred
-
ImageType
Creates instance based on the given type.
-
-
Method Details