Write an EGAMI content
Table of Contents
Include EGAMI
#include <egami/egami.hpp>
Declare image interface
// create an empty Image (no type and no inside data)
egami::Image image;
Create an image with data
Set image point:
// create an empty Image (no type and no inside data)
egami::Image image(ivec2(25,25));
image.set(ivec2(5,5), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
image.set(ivec2(12,15), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
image.set(ivec2(4,9), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
// ...
Write image with egami
Write the data in the file:
All example file
#include <test-debug/debug.hpp>
#include <egami/egami.hpp>
#include "write.hpp"
static void writeBMP() {
// create an empty Image (no type and no inside data)
egami::Image image(ivec2(25,25));
image.set(ivec2(5,5), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
image.set(ivec2(12,15), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
image.set(ivec2(4,9), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
// ...
TEST_INFO("image write (BMP): " << ret);
}
static void writeSVG() {
TEST_INFO("image write (SVG): Not Avaliiable");
}
static void writePNG() {
TEST_INFO("image write (PNG): Not Avaliiable");
}
void appl::write() {
writeBMP();
writeSVG();
writePNG();
}