mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Changed RgbImage to template based Image (with template for pixel type)
Former-commit-id: ef02f164eaf3c2f9dd552c1c17b525cf6eed499c
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
// Utils includes
|
||||
#include <utils/RgbImage.h>
|
||||
#include <utils/Image.h>
|
||||
#include <utils/jsonschema/JsonFactory.h>
|
||||
|
||||
// Hyperion includes
|
||||
@@ -25,16 +25,16 @@ int main()
|
||||
|
||||
const LedString ledString = Hyperion::createLedString(config["leds"]);
|
||||
|
||||
const RgbColor testColor = {64, 123, 12};
|
||||
const ColorRgb testColor = {64, 123, 12};
|
||||
|
||||
RgbImage image(64, 64, testColor);
|
||||
Image<ColorRgb> image(64, 64, testColor);
|
||||
ImageToLedsMap map(64, 64, 0, 0, ledString.leds());
|
||||
|
||||
std::vector<RgbColor> ledColors(ledString.leds().size());
|
||||
std::vector<ColorRgb> ledColors(ledString.leds().size());
|
||||
map.getMeanLedColor(image, ledColors);
|
||||
|
||||
std::cout << "[";
|
||||
for (const RgbColor & color : ledColors)
|
||||
for (const ColorRgb & color : ledColors)
|
||||
{
|
||||
std::cout << color;
|
||||
}
|
||||
|
Reference in New Issue
Block a user