The supported image file formats.
abstract class
|
ImageFormat
|
extends
|
FileFormat
|
||
base of
|
GdalImageFormat
|
The file format is unknown and will be determined automatically.
public
static
readonly
field
|
Any
|
||
type
|
ImageFormat
|
Remarks:
Use Next to walk through all registered formats.
The BMP image file format.
public
static
readonly
field
|
BMP
|
||
type
|
ImageFormat
|
The DDS image file format.
public
static
readonly
field
|
DDS
|
||
type
|
ImageFormat
|
The JPEG image file format.
public
static
readonly
field
|
JPEG
|
||
type
|
ImageFormat
|
The PNG image file format.
public
static
readonly
field
|
PNG
|
||
type
|
ImageFormat
|
The PXB image file format ('PiXel Buffer', proprietary).
public
static
readonly
field
|
PXB
|
||
type
|
ImageFormat
|
See also:
ColorBufferThe TGA image file format.
public
static
readonly
field
|
TGA
|
||
type
|
ImageFormat
|
The TIFF image file format.
public
static
readonly
field
|
TIFF
|
||
type
|
ImageFormat
|
The TXB image file format ('TeXel Buffer', proprietary).
public
static
readonly
field
|
TXB
|
||
type
|
ImageFormat
|
See also:
TexelBufferLong description of this file format.
public
virtual
property
|
Description
{
get
}
|
||
type
|
string
|
||
value
|
|
The description string. | |
inherited
|
FileFormat.Description
|
The file format name.
public
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The file format name. | |
inherited
|
FileFormat.Name
|
Returns the next file format.
[ThreadSafe]
|
||||
public
property
|
Next
{
get
}
|
|||
type
|
IFileFormat
|
|||
value
|
The
next
file
format
or
null . |
|||
inherited
|
FileFormat.Next
|
Remarks:
The first file format can be obtained from implementing classes. This property can be used to cycle all available file formats of the same type.
The type of this file format (e.g. images, shapes, 3D models).
public
property
|
Type
{
get
}
|
||
type
|
string
|
||
value
|
|
The human-readable type name. | |
inherited
|
FileFormat.Type
|
Can this file format object be used to read the given path?
public
virtual
method
|
CanRead
(string suffix,
bool directory = false)
|
||
type
|
bool
|
||
params
|
suffix
|
[not-null]
|
The
lower-case
pathname
suffix
(without
'.' ).
Will
be
empty
if
the
path
does
not
have
a
pathname
suffix.
|
directory
|
Does
the
path
refer
to
a
directory
(true )
or
to
a
file
(false )?
Defaults
to
false .
|
||
returns
|
true
if
this
file
format
can
be
used,
false
if
not. |
||
inherited
|
FileFormat.CanRead
|
Returns the first file format in the chain (see IFileFormat) that can read the given path.
public
method
|
CanReadFind
(string suffix,
bool directory = false)
|
||
type
|
IFileFormat
|
||
params
|
suffix
|
[not-null]
|
The
lower-case
pathname
suffix
(without
'.' ).
Will
be
empty
if
the
path
does
not
have
a
pathname
suffix.
|
directory
|
Does
the
path
refer
to
a
directory
(true )
or
to
a
file
(false )?
Defaults
to
false .
|
||
returns
|
The
found
file
format
or
null . |
||
inherited
|
FileFormat.CanReadFind
|
Can this file format object be used to write the given path?
public
virtual
method
|
CanWrite
(string suffix)
|
||
type
|
bool
|
||
params
|
suffix
|
[not-null]
|
The
lower-case
pathname
suffix
(without
'.' ).
Will
be
empty
if
the
path
does
not
have
a
pathname
suffix.
|
returns
|
true
if
this
file
format
can
be
used,
false
if
not. |
||
inherited
|
FileFormat.CanWrite
|
Returns a file image format by its Name.
public
static
method
|
ForName
(string name)
|
||
type
|
ImageFormat
|
||
params
|
name
|
[not-empty]
|
The file image format name. |
returns
|
|
The file image format or Any if not found. |
This is a no-op method that forces the compiler / linker to include this type in the resulting binary.
public
virtual
method
|
PleaseIncludeInBinaryThanks
()
|
||
inherited
|
FileFormat.PleaseIncludeInBinaryThanks
|
Remarks:
Calling this stub method makes sure that all lazy constructor calls have been made.
To initialize everything, an application needs to call this method on its root module(s) (see TinmanModule), followed by a call to PleaseIncludeInBinaryThanksAll.
Reads the given image.
[OwnerReturn]
|
||||
public
abstract
method
|
ReadImage
(IFileData data,
ReadImageFlags flags)
|
|||
type
|
IImageReader
|
|||
params
|
data
|
[not-null]
|
The image data provider. | |
flags
|
The image reading flags. | |||
returns
|
|
The IImageReader for reading the image data. |
Tries to read the given image data as a texture.
[OwnerReturn]
|
||||
public
virtual
method
|
ReadTexture
(IFileData data,
CubemapFace face)
|
|||
type
|
TexelBuffer
|
|||
params
|
data
|
[not-null]
|
The image data provider. | |
face
|
The cubemap face. | |||
returns
|
The
read
TexelBuffer
or
null
if
the
given
image
data
cannot
be
interpreted
as
a
texture
(pixels
must
be
read
separately
and
then
encoded
as
texels).
|
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|
|||
inherited
|
FileFormat.ToString
|
Writes an image to the given file.
[OwnerReturn]
|
||||
public
virtual
method
|
WriteImage
(Path file)
|
|||
type
|
IImageWriter
|
|||
params
|
file
|
[not-null]
|
The output image file. | |
returns
|
|
The image writer object to use. |
Exceptions:
false
).
Has this file format been registered?
protected
property
|
IsRegistered
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
file
format
has
been
registered,
false
if
not. |
||
inherited
|
FileFormat.IsRegistered
|
See also:
FileFormat.RegisterCreates a new instance of ImageFormat.
protected
constructor
|
ImageFormat
(string name,
string description,
bool isAny = false)
|
||
params
|
name
|
[not-empty]
|
Value for Name |
description
|
[not-empty]
|
Value for Description | |
isAny
|
Is this an automatic file format? |
protected
static
method
|
CannotWrite
(string source,
Path file)
|
||
type
|
TinmanException
|
||
params
|
source
|
||
file
|
Finds the IFileFormat that has the given name.
protected
method
|
NameFind
(string name)
|
||
type
|
IFileFormat
|
||
params
|
name
|
[not-empty]
|
The file format name. |
returns
|
The
found
file
format
or
null . |
||
inherited
|
FileFormat.NameFind
|
Appends this file format to the chain of the given file format.
[ThreadSafe]
|
||||
protected
method
|
Register
(FileFormat any)
|
|||
params
|
any
|
[not-null]
|
The file format chain to append to. | |
inherited
|
FileFormat.Register
|
protected
method
|
ThrowIfNotRegistered
()
|
||
inherited
|
FileFormat.ThrowIfNotRegistered
|