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,18 +1,22 @@
|
||||
|
||||
// STL includes
|
||||
#include <iostream>
|
||||
|
||||
// Utils includes
|
||||
#include <utils/RgbImage.h>
|
||||
#include <utils/Image.h>
|
||||
#include <utils/ColorRgb.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Constructing image" << std::endl;
|
||||
RgbImage image(64, 64, RgbColor::BLACK);
|
||||
Image<ColorRgb> image(64, 64, ColorRgb::BLACK);
|
||||
|
||||
std::cout << "Writing image" << std::endl;
|
||||
for (unsigned y=0; y<64; ++y)
|
||||
{
|
||||
for (unsigned x=0; x<64; ++x)
|
||||
{
|
||||
image(x,y) = RgbColor::RED;
|
||||
image(x,y) = ColorRgb::RED;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user