MRaster lib 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
hello.cpp
Go to the documentation of this file.
1#include "ramCanvas.hpp" // The main MRaster include
2
3int main(void) {
4 mjr::ramCanvas3c8b theRamCanvas(1024, 1024); // Create a canvas object
5 for(int y=0;y<theRamCanvas.getNumPixY();y++) // Run over the rows
6 for(int x=0;x<theRamCanvas.getNumPixX();x++) // and columns of the image
7 theRamCanvas.drawPoint(x, y, mjr::color3c8b::csCColdeRainbow::c(x+y)); // Pick a "rainbow" color for the point
8 theRamCanvas.writeTIFFfile("hello.tiff"); // Write out our image to disk
9}
Class providing off-screen drawing functionality.
int writeTIFFfile(std::string fileName, rcConT rcConverter, bool markAlpha)
Write a TIFF format image file.
intCrdT getNumPixX() const
intCrdT getNumPixY() const
void drawPoint(intCrdT x, intCrdT y, colorArgType color)
Draw a point at the specified coordinates with the specified color.
int main(void)
Definition hello.cpp:3
User include file for ramCanvas types.