Utility class for working with image files.
static class
|
ImagingUtil
|
The configurator object for InterpolationMode values.
public
static
readonly
field
|
ConfigInterpolationMode
|
||
type
|
IConfigurator<InterpolationMode>
|
The configurator object for PixelChannel values.
public
static
readonly
field
|
ConfigPixelChannel
|
||
type
|
IConfigurator<PixelChannel>
|
The configurator object for PixelCoverage values.
public
static
readonly
field
|
ConfigPixelCoverage
|
||
type
|
IConfigurator<PixelCoverage>
|
The configurator object for PixelFormat values.
public
static
readonly
field
|
ConfigPixelFormat
|
||
type
|
IConfigurator<PixelFormat>
|
Special gamma correction value for the sRGB color space (see Gamma).
public
constant
|
GammaFromSrgb
=
-2.2
|
||
type
|
float64
|
Remarks:
Color
space
decompression
for
sRGB
can
be
approximated
with
the
exponent
2.2
.
The
full
formula
is
implemented
in
FromSrgbF.
Special gamma correction value for the sRGB color space (see Gamma).
public
constant
|
GammaToSrgb
=
-0.45455
|
||
type
|
float64
|
Remarks:
This
is
the
same
value
that
is
found
in
the
gAMA
chunk
of
sRGB
compressed
PNG
files.
The binary format of an image file format is invalid and cannot be read.
[Pure]
|
||||
public
static
method
|
BadFormat
(string source,
string format,
IPathInfo path,
string message = null)
|
|||
type
|
IOException
|
|||
params
|
source
|
Error source tag. | ||
format
|
[not-empty]
|
The file format name. | ||
path
|
[not-null]
|
The path info object. | ||
message
|
Optional
error
message.
Defaults
to
null . |
|||
returns
|
The ready-to-throw exception. |
Returns the number of bytes per pixel for the given pixel format.
[Pure]
|
||||
public
static
method
|
BytesPerPixel
(PixelFormat pixelFormat)
|
|||
type
|
int32
|
|||
params
|
pixelFormat
|
The pixel format. | ||
returns
|
|
The number of bytes per pixel. |
Multiplies the given gamma correction values (see Gamma), as would be done with pure exponents.
[Pure]
|
||||
public
static
method
|
GammaMul
(float64 a,
float64 b)
|
|||
type
|
float64
|
|||
params
|
a
|
First gamma correction value. | ||
b
|
Second gamma correction value. | |||
returns
|
The resulting gamma correction value. |
Returns the reciprocal of the given gamma correction value (see Gamma), as would be done with a pure exponent.
[Pure]
|
||||
public
static
method
|
GammaRcp
(float64 a)
|
|||
type
|
float64
|
|||
params
|
a
|
The gamma correction value. | ||
returns
|
The resulting gamma correction value. |
Returns a MapInfo value for the given image info.
[Pure]
|
||||
public
static
method
|
MapInfoFor
(IImageInfo info)
|
|||
type
|
MapInfo
|
|||
params
|
info
|
[not-null]
|
The image info. | |
returns
|
The MapInfo value. |
Returns the pixel format of the given color.
[Pure]
|
||||
public
static
method
|
PixelFormatOf
(int64 color)
|
|||
type
|
PixelFormat
|
|||
params
|
color
|
The color value (see Colors). | ||
returns
|
The pixel format. |
Combines the union of the given pixel formats.
[Pure]
|
||||
public
static
method
|
PixelFormatUnion
(PixelFormat a,
PixelFormat b)
|
|||
type
|
PixelFormat
|
|||
params
|
a
|
First pixel format. | ||
b
|
Second pixel format. | |||
returns
|
The combined pixel format that can represent pixels in both of the given formats, without loss of data. |
Returns the number of samples per pixel for the given pixel format.
[Pure]
|
||||
public
static
method
|
SamplesPerPixel
(PixelFormat pixelFormat)
|
|||
type
|
int32
|
|||
params
|
pixelFormat
|
The pixel format. | ||
returns
|
|
The number of samples per pixel. |