a sample in a bmp rgb (i.e. 24-bit) file
#include <BmpRGBSampleValue.h>
|
EmbValue | EValue |
| the bit that is embedded in this sample value - must be set in constructor of derived class
|
UWORD32 | Key |
| the key of this sample value - must be different for two different sample values - must be set in constructor of derived class
|
◆ COLOR
◆ DIRECTION
◆ BmpRGBSampleValue() [1/2]
BmpRGBSampleValue::BmpRGBSampleValue |
( |
BYTE | r, |
|
|
BYTE | g, |
|
|
BYTE | b ) |
◆ BmpRGBSampleValue() [2/2]
BmpRGBSampleValue::BmpRGBSampleValue |
( |
RGBTriple | t | ) |
|
◆ addNTSVCandidates()
add candidates for the nearest target sample value
- Parameters
-
cands | the candidates vector |
cube | the color values describing the current search cube |
fc | the fixed color |
fd | the fixed side of the fixed color |
◆ calcDistance()
calculate the distance between the sample value s and this sample value
- Parameters
-
s | a sample value of the same type as this |
- Returns
- the distance
Reimplemented from BmpSampleValue.
◆ calcEValue()
◆ calcKey()
◆ getBlue()
BYTE BmpRGBSampleValue::getBlue |
( |
void | | ) |
const |
|
inlinevirtual |
◆ getGreen()
BYTE BmpRGBSampleValue::getGreen |
( |
void | | ) |
const |
|
inlinevirtual |
◆ getName()
std::string BmpRGBSampleValue::getName |
( |
void | | ) |
const |
|
virtual |
return a short name uniquely identifying this sample value
Implements SampleValue.
◆ getNearestTargetSampleValue()
get the nearest (with the least distance to this sample value) sample value whose embedded value equals the specified target
- Parameters
-
t | the target embedded value |
If two or more target sample values have equal distance each of them should be returned with equal probability.
The returned SampleValue object should be deleted by the callser.
Implements SampleValue.
◆ getRed()
BYTE BmpRGBSampleValue::getRed |
( |
void | | ) |
const |
|
inlinevirtual |
◆ minus()
substract the BYTE b from the BYTE a
- Returns
- max(0, a - b)
◆ plus()
add the BYTEs a and b
- Returns
- min(255, a + b)
◆ Color
The documentation for this class was generated from the following files: