MRaster lib 22.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}
int writeTIFFfile(std::string fileName, rcConT pxFilter, bool markAlpha=true)
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
ramCanvasTpl< color3c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false > ramCanvas3c8b
Canvas type: generic 24-bit with 3 channels at 8-bit uint per channel.
Definition ramCanvas.hpp:53
User include file for ramCanvas types.