Picture data and operations that are independent of file format, but more complex that just container access More...
#include <libnebular.hpp>
Inherits libnebular::PicturePropContainer.
Inherited by libnebular::Picture.
Classes | |
class | Impl_ |
Public Member Functions | |
PictureProps () | |
~PictureProps () | |
template<typename T > | |
void | check () |
Checks properties corresponding to T . | |
void | setDefaults () |
Sets properties to their defaults. | |
void | checkUnusedOpts () |
Checks for remaining properties with names prefixed by "opt/": warns and unsets every found. | |
template<typename T > | |
void | calculate () |
Calculates values for properties given by template argument. | |
void | reproduce (PictureProps &src) |
Copies (with extended meaning) PictureProps from "src" to "this" with action parameters given in "this" property map. | |
void | prepareReproduceBmInfo (PictureProps &src) |
Determines "bm/data" property size; for usage in conjunction with reproduce() . |
Picture data and operations that are independent of file format, but more complex that just container access
Mainly for use in Picture
.
Definition at line 521 of file libnebular.hpp.
libnebular::PictureProps::PictureProps | ( | ) |
libnebular::PictureProps::~PictureProps | ( | ) |
Definition at line 179 of file picture-props.cpp.
void libnebular::PictureProps::calculate | ( | ) | [inline] |
Calculates values for properties given by template argument.
For where to find template argument for property you need, see Properties.
Currently defined for: PropCalcBmSizeLengthUnits
, PropCalcBmPixelMaskMisc
, PropCalcBmDataSize
, PropCalcBmColorsUsed
.
void libnebular::PictureProps::check | ( | ) | [inline] |
Checks properties corresponding to T
.
Really checks and updates dependent values. If check is failed, throws Error
. For where to find template argument for property you need, see Properties.
Currently defined for: PropBmInfo
, PropBmData
, PropBmPixelFormat
, PropBmPixelsPerLength
, PropBmMiscStorageParams
, PropBmMiscDisplayParams
. (Concrete implementations of this are made by explicit template specialization.)
void libnebular::PictureProps::checkUnusedOpts | ( | ) |
Checks for remaining properties with names prefixed by "opt/": warns and unsets every found.
Definition at line 778 of file picture-props.cpp.
void libnebular::PictureProps::prepareReproduceBmInfo | ( | PictureProps & | src | ) |
Determines "bm/data" property size; for usage in conjunction with reproduce()
.
Used for external (user-controlled) "bm/data" Blob
memory allocation before reproduce
Definition at line 440 of file picture-props.cpp.
void libnebular::PictureProps::reproduce | ( | PictureProps & | src | ) |
Copies (with extended meaning) PictureProps
from "src" to "this" with action parameters given in "this" property map.
How to implement loading of bitmap to user-specified memory area? So, (1) use prepareReproduceBmInfo()
to determine needed memory size; (2) allocate memory as you want; (3) attach allocated memory to Blob
by Blob::attach
; (4) set this Blob
as "bm/data" value before usage of reproduce
Picture::reproduce()
Why conversions wasn't in SRS but i still need it? Maybe, some tests are wrong (~_^)
Flip is needed: "In Windows 95 ⟨...⟩ There also can be "top-down" and "bottom-up" BMP-s."
Rotation for right angle is available by flips and transpose
Also there is "future-planning" support for grayscale and palettized formats; "future-planning" support for up-to-48-bit pixels
Хотелось бы чтоб пользователь имел возможность определять преобразование, как будет храниться битовая маска: RGB565, BGR888 и т.д.,т.е. задавал формат указывая: 1. Количесто бит на биксель 2. Количество бит на канал 4. Последовательность каналов.
prepareReproduceBmInfo()
second time - but how otherwise provide picture validity before reproduce()
?Coverts pixels in different formats
Containse some precomputed data that aids the process
Bit-shift left
Negative amount
is shift to other side
Definition at line 531 of file picture-props.cpp.
void libnebular::PictureProps::setDefaults | ( | ) |
Sets properties to their defaults.
Definition at line 181 of file picture-props.cpp.