Data and metadata for an image.
More...
#include <elft.h>
|
| uint8_t | identifier {} |
| | An identifier for this image.
|
| |
| uint16_t | width {} |
| | Width of the image.
|
| |
| uint16_t | height {} |
| | Height of the image.
|
| |
| uint16_t | ppi {} |
| | Resolution of the image in pixels per inch.
|
| |
| uint8_t | bpc {} |
| | Number of bits used by each color component (8 or 16).
|
| |
| uint8_t | bpp {} |
| | Number of bits comprising a single pixel (8, 16, 24, or 48).
|
| |
| std::vector< std::byte > | pixels {} |
| | Raw pixel data of image.
|
| |
Data and metadata for an image.
Definition at line 219 of file elft.h.
◆ Image() [1/2]
◆ Image() [2/2]
| ELFT::Image::Image |
( |
const uint8_t | identifier, |
|
|
const uint16_t | width, |
|
|
const uint16_t | height, |
|
|
const uint16_t | ppi, |
|
|
const uint8_t | bpc, |
|
|
const uint8_t | bpp, |
|
|
const std::vector< std::byte > & | pixels ) |
Image constructor.
- Parameters
-
| identifier | An identifier for this image. Used to link Image to TemplateData and Correspondence. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| ppi | Resolution of the image in pixels per inch. |
| bpc | Number of bits used by each color component (8 or 16). |
| bpp | Number of bits comprising a single pixel (8, 16, 24, or 48). |
| pixels | width * height * (bpp / bpc) bytes of image data, with pixels.front() representing the first byte of the top-left pixel, and pixels.back() representing the last byte of the bottom-right pixel. It is decompressed big endian image data, canonically coded as defined in ISO/IEC 19794-4:2005, section 6.2. For example, 0xFF00 is closer to white than it is to black. |
- Note
- Number of color components is
bpp / bpc and shall be either 1 (grayscale) or 3 (RGB).
Definition at line 35 of file libelft.cpp.
◆ identifier
| uint8_t ELFT::Image::identifier {} |
◆ width
| uint16_t ELFT::Image::width {} |
Width of the image.
Definition at line 268 of file elft.h.
◆ height
| uint16_t ELFT::Image::height {} |
Height of the image.
Definition at line 270 of file elft.h.
◆ ppi
| uint16_t ELFT::Image::ppi {} |
Resolution of the image in pixels per inch.
Definition at line 272 of file elft.h.
◆ bpc
| uint8_t ELFT::Image::bpc {} |
Number of bits used by each color component (8 or 16).
Definition at line 274 of file elft.h.
◆ bpp
| uint8_t ELFT::Image::bpp {} |
Number of bits comprising a single pixel (8, 16, 24, or 48).
Definition at line 279 of file elft.h.
◆ pixels
| std::vector<std::byte> ELFT::Image::pixels {} |
Raw pixel data of image.
width * height * (bpp / bpc) bytes of image data, with pixels.front() representing the first byte of the top-left pixel, and pixels.back() representing the last byte of the bottom-right pixel. It is decompressed big endian image data, canonically coded as defined in ISO/IEC 19794-4:2005, section 6.2. For example, 0xFF00 is closer to white than it is to black.
- Note
- To pass pixels to a C-style array, invoke pixel's
data() method (pixels.data()).
Definition at line 297 of file elft.h.
The documentation for this struct was generated from the following files: