API Documentation
Classes | Enumerations
nkImages Namespace Reference

Encompasses all API of component NilkinsImages. More...

Classes

struct  AlignmentDescriptor
 Holds information about alignment constraints. More...
 
class  AlignmentUtils
 Offers tools to realign an image's memory. More...
 
class  BmpEncoder
 Offers capabilities to encode and decode BMP format. More...
 
class  CompositeEncoder
 Utility encoder using all other encoders within nkImages to parse arbitrary data. More...
 
class  ConversionUtils
 Utility class offering helpers for conversions. More...
 
class  DdsEncoder
 Offers capabilities to encode and decode DDS format. More...
 
class  HdrEncoder
 Offers capabilities to encode and decode HDR format. More...
 
class  Image
 Holds all information required for an image, with ownership over the data. More...
 
class  ImageBase
 Base for all image data classes. More...
 
struct  ImageDescriptor
 Describes an image within an array. Used internally. More...
 
class  ImageView
 Holds all information required for an image, with no ownership over the data. More...
 
struct  JpgCompressionSettings
 Describes available settings for Jpeg encoding queries. More...
 
class  JpgEncoder
 Offers capabilities to encode and decode JPEG format. More...
 
class  LogManager
 Responsible for logging all messages from the component. More...
 
struct  MipDescriptor
 Describes a mip within an image. Used internally. More...
 
class  PixelFormatUtils
 Utility class to translate enum values into linked useful data. More...
 
class  PngEncoder
 Offers capabilities to decode the PNG format. More...
 

Enumerations

enum  ALPHA_MODE { ALPHA_MODE::AUTO = 0, ALPHA_MODE::NO_ALPHA, ALPHA_MODE::ALPHA }
 Lists possible modes for the alpha channel. More...
 
enum  PIXEL_FORMAT {
  PIXEL_FORMAT::UNKNOWN_FORMAT = 0, PIXEL_FORMAT::R8, PIXEL_FORMAT::R8A8, PIXEL_FORMAT::R8G8B8,
  PIXEL_FORMAT::R8G8B8A8, PIXEL_FORMAT::B8G8R8, PIXEL_FORMAT::B8G8R8A8, PIXEL_FORMAT::R16G16B16A16,
  PIXEL_FORMAT::R32G32B32, PIXEL_FORMAT::R32G32B32A32, PIXEL_FORMAT::Y8U8V8_444, PIXEL_FORMAT::Y8U8Y8V8_422,
  PIXEL_FORMAT::Y8U8V8_420_SP, PIXEL_FORMAT::Y8Y8U8Y8Y8V8_411, PIXEL_FORMAT::BC1, PIXEL_FORMAT::BC2,
  PIXEL_FORMAT::BC3, PIXEL_FORMAT::BC4, PIXEL_FORMAT::BC5
}
 Lists formats for pixels. More...
 
enum  JPG_COMPRESSION { JPG_COMPRESSION::AUTOMATIC = 0, JPG_COMPRESSION::YUV_444, JPG_COMPRESSION::YUV_422, JPG_COMPRESSION::YUV_420 }
 

Detailed Description

Encompasses all API of component NilkinsImages.

This component provides utility to load and save images, supporting some well-known formats.

nkImages is designed with graphics in mind, meaning that there are multiple options for specifying data alignment constraints. Decoded data will fit these alignment restrictions.

This can be useful for textures, which can require specific pixel / row alignments. Specifying these alignment constraints in advance means that no memory copy and realignment is necessary after decoding.

For more information on what formats are supported, see the *Encoder classes adapted to each format.

Enumeration Type Documentation

◆ ALPHA_MODE

enum nkImages::ALPHA_MODE
strong

Lists possible modes for the alpha channel.

This enum can be used to describe what kind of constraint an image should satisfy. Encoders will follow these constraints to generate images fitting the needs of the caller.

Enumerator
AUTO 

Automatic, the alpha channel will be available as described by the data parsed.

NO_ALPHA 

No alpha, forced. If a file has an alpha channel, it will be discarded.

ALPHA 

Alpha forced. If a file has no alpha channel, it will be added and defaulted to fully opaque.

◆ PIXEL_FORMAT

Lists formats for pixels.

A pixel is often described by a set of 4 channels : Red, Green, Blue, and Alpha. Depending on the format, those channels can be exposed or not, with differing memory layouts. This enum hints what is available and how it is exposed.

Enumerator
UNKNOWN_FORMAT 

Format is unknown or not supported.

R8 

Format is 1 channel Red, occupying 8 bits (1 byte).

R8A8 

Format is 2 channels Red Alpha, each occupying 8 bits (1 byte).

R8G8B8 

Format is 3 channels Red Green Blue, each occupying 8 bits (1 byte).

R8G8B8A8 

Format is 4 channels Red Green Blue Alpha, each occupying 8 bits (1 byte).

B8G8R8 

Format is 3 channels Blue Green Red, each occupying 8 bits (1 byte).

B8G8R8A8 

Format is 4 channels Blue Green Red Alpha, each occupying 8 bits (1 byte).

R16G16B16A16 

Format is 4 channels Red Green Blue Alpha, each occupying 16 bits (2 bytes), half floats.

R32G32B32 

Format is 3 channels Red Green Blue, each occupying 32 bits (4 bytes), floats.

R32G32B32A32 

Format is 4 channels Red Green Blue Alpha, each occupying 32 bits (4 bytes), floats.

Y8U8V8_444 

YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage order is YUV.

Y8U8Y8V8_422 

YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage order is YUYV.

Y8U8V8_420_SP 

YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage is semi planar, meaning that Y plane comes first, before UV interleaved plane.

Y8Y8U8Y8Y8V8_411 

YUV format (luminance and chrominance), each channel on 8 bits (1 byte). Internal storage order is YYUYYV.

BC1 

Block Compression 1 format, encoding 4x4 pixels (RGBA) in 8 bytes.

BC2 

Block Compression 2 format, encoding 4x4 pixels (RGBA) in 16 bytes.

BC3 

Block Compression 3 format, encoding 4x4 pixels (RGBA) in 16 bytes.

BC4 

Block Compression 4 format, encoding 4x4 pixels (R) in 8 bytes.

BC5 

Block Compression 5 format, encoding 4x4 pixels (RG) in 16 bytes.

◆ JPG_COMPRESSION

Lists available compression schemes for Jpeg encoding.

Enumerator
AUTOMATIC 

Automatically derived from given image's format. If conversion to YUV is needed (for instance from RGB), YUV_444 will be chosen.

YUV_444 

Forces data to be encoded using YUV 4:4:4.

YUV_422 

Forces data to be encoded using YUV 4:2:2.

YUV_420 

Forces data to be encoded using YUV 4:2:0 semi planar.