mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fixed memory overwrite bug. This fixes the png writer and led control.
This commit is contained in:
22
test/TestRgbImage.cpp
Normal file
22
test/TestRgbImage.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
// Utils includes
|
||||
#include <utils/RgbImage.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Constructing image" << std::endl;
|
||||
RgbImage image(64, 64, RgbColor::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;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Finished (destruction will be performed)" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user