mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Dominant Color support (#1569)
* Dominant Color and Mean Color Squared * Workaround - Suppress empty LED updates * Add missing text * Dominant Colors advanced * Test with fixed initial colors * Test with fixed initial colors * Support new processing values via API * ImageToLED - Add reduced pixel processing, make dominant color advanced configurable * Updates on Grabber fps setting * ImageToLedMap - Remove maptype and update test * Update dynamic cluster array allocation
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
#include <QRgb>
|
||||
|
||||
///
|
||||
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
||||
@@ -52,6 +53,18 @@ struct ColorRgb
|
||||
return a;
|
||||
}
|
||||
|
||||
QRgb rgb() const
|
||||
{
|
||||
return qRgb(red,green,blue);
|
||||
}
|
||||
|
||||
void setRgb(QRgb rgb)
|
||||
{
|
||||
red = static_cast<uint8_t>(qRed(rgb));
|
||||
green = static_cast<uint8_t>(qGreen(rgb));
|
||||
blue = static_cast<uint8_t>(qBlue(rgb));
|
||||
}
|
||||
|
||||
QString toQString() const
|
||||
{
|
||||
return QString("(%1,%2,%3)").arg(red).arg(green).arg(blue);
|
||||
|
Reference in New Issue
Block a user