ImageFormat
Description
- Derived from
-
FileFormat abstract
- Extended by
-
GdalImageFormat sealed
The supported image file formats.
Each built-in image file format has a short text block that indicates which features are supported:
-
Write supported: …
See IFileFormat.CanWrite and WriteImage. -
IANA media type: …
See FileFormat.ForMime -
File extensions: …
See IFileFormat.CanRead2 -
Prefix sequence: …
See IFileFormat.CanRead1 -
Raw value range: …
See IImageInfo.Values
Public / Constants
Any
The file format is unknown and will be determined automatically.
Use IFileFormat.Next to walk through all registered formats.
BMP
The BMP image file format.
Write supported: yes
IANA media type: image/bmp
File extensions: .bmp
Prefix sequence: yes
Raw value range: no
When writing *.bmp
files, the following information will be lost:
-
IImageInfo.Coverage, will become PixelCoverage.PixelIsArea.
-
IImageInfo.Gamma, will become
-2.2
(sRGB). -
IGeorefInfo.Georef, will become
null
. -
IImageInfo.Layer, will become HeightmapLayer.None.
-
IImageInfo.NoData, will become Maths.NanD.
-
PixelFormat.Grayscale, PixelFormat.SixteenBits, PixelFormat.Precision of IImageInfo.PixelFormat, will become PixelFormat.Truecolor / PixelFormat.Alpha.
-
IImageInfo.Range, will become PixelRange.DefaultUInt8.
DDS
The DDS image file format.
Write supported: no
IANA media type: none
File extensions: .dds
Prefix sequence: yes
Raw value range: no
GIF
The GIF image file format.
Write supported: no
IANA media type: image/gif
File extensions: .gif
Prefix sequence: yes
Raw value range: no
HDR
The HDR image file format.
Write supported: no
IANA media type: image/vnd.radiance
File extensions: .hdr
Prefix sequence: yes
Raw value range: no
JPEG
The JPEG image file format.
Write supported: no
IANA media type: image/jpeg
File extensions: .jpeg .jpg
Prefix sequence: yes
Raw value range: no
PNG
The PNG image file format.
Write supported: no
IANA media type: image/png
File extensions: .png
Prefix sequence: yes
Raw value range: no
PXB
The PXB image file format ('PiXel Buffer', proprietary).
Write supported: yes
IANA media type: none
File extensions: .pxb
Prefix sequence: yes
Raw value range: no
When writing *.pxb
files, the following information will be lost:
-
IImageInfo.Coverage, will become PixelCoverage.PixelIsArea.
-
IImageInfo.Gamma, will become
0
(linear sRGB). -
IGeorefInfo.Georef, will become
null
. -
IImageInfo.Layer, will become HeightmapLayer.None.
-
IImageInfo.NoData, will become Maths.NanD.
-
IImageInfo.Range, will become PixelRange.Identity.
- See also
SimpleHttp
A ISimpleHttpImage object that uses Any to decode image data.
The image format is determined from the binary file format prefix (see IFileFormat.CanRead1), falling back to the content type (see FileFormat.ForMime), as returned by the web server.
TGA
The TGA image file format.
Write supported: yes
IANA media type: none
File extensions: .tga
Prefix sequence: no
Raw value range: no
When writing *.bmp
files, the following information will be lost:
-
IImageInfo.Coverage, will become PixelCoverage.PixelIsArea.
-
IImageInfo.Gamma, will become
-2.2
(sRGB). -
IGeorefInfo.Georef, will become
null
. -
IImageInfo.Layer, will become HeightmapLayer.None.
-
IImageInfo.NoData, will become Maths.NanD.
-
PixelFormat.SixteenBits, PixelFormat.Precision of IImageInfo.PixelFormat, will become PixelFormat.Grayscale / PixelFormat.Truecolor / PixelFormat.Alpha.
-
IImageInfo.Range, will become PixelRange.DefaultUInt8.
TIFF
The TIFF image file format.
Write supported: no
IANA media type: image/tiff
File extensions: .tif .tiff
Prefix sequence: yes
Raw value range: yes
Public / Methods
ReadImage
Reads the given image.
- IOException
-
If an I/O error has occurred while opening the image data.
- GeorefException
-
If the image contains unsupported geo-referencing metadata.
- ValidatingException
-
If a validation error has occurred on data in or the returned image reader.
ReadTexture
Tries to read the given image data as a texture.
- IOException
-
If an I/O error has occurred.
- ValidatingException
-
If a validation error has occurred on data in or the returned image reader.
WriteImage
Writes an image to the given file.
- IOException
-
If this image format does not support writing (i.e. IFileFormat.CanWrite would return
false
).
- See also
Protected / Methods
DoReadImage
Reads the given image.
- IOException
-
If an I/O error has occurred while opening the image.
- GeorefException
-
If the image contains unsupported geo-referencing metadata.