40#include "ramCanvas.hpp"
43unsigned long igray(
unsigned long n);
47 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
48 mjr::ramCanvas3c8b theRamCanvas_iii(4096, 4096);
49 mjr::ramCanvas3c8b theRamCanvas_int(4096, 4096);
50 mjr::ramCanvas3c8b theRamCanvas_gry(4096, 4096);
51 mjr::ramCanvas3c8b theRamCanvas_rgb(4096, 4096);
52 mjr::ramCanvas3c8b theRamCanvas_web(4096, 4096);
54 mjr::ramCanvasRGB8b::colorChanType red=0, blue=0, green=0;
56 mjr::ramCanvas3c8b::colorType aColor;
57 for(
int y=0;y<theRamCanvas_int.getNumPixY();y++) {
58 for(
int x=0;x<theRamCanvas_int.getNumPixX();x++) {
59 aColor.setRGBfromLogPackIntGen(count, 0, 1, 2);
60 theRamCanvas_iii.drawPoint(x, y, aColor);
61 aColor.setRGBfromLogPackIntABGR(count);
62 theRamCanvas_int.drawPoint(x, y, aColor);
63 aColor.setRGBfromLogPackIntABGR(
static_cast<mjr::ramCanvas3c8b::colorType::packed4Cint
>(igray(count)));
64 theRamCanvas_gry.drawPoint(x, y, aColor);
65 aColor.setChansRGB(red, green, blue);
66 theRamCanvas_rgb.drawPoint(x, y, aColor);
67 aColor.tfrmWebSafeRGB();
68 theRamCanvas_web.drawPoint(x, y, aColor);
84 theRamCanvas_int.writeTIFFfile(
"color_all_int.tiff");
85 theRamCanvas_iii.writeTIFFfile(
"color_all_iii.tiff");
86 theRamCanvas_gry.writeTIFFfile(
"color_all_gry.tiff");
87 theRamCanvas_rgb.writeTIFFfile(
"color_all_rgb.tiff");
88 theRamCanvas_web.writeTIFFfile(
"color_all_web.tiff");
89 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
90 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
94unsigned long igray(
unsigned long n) {
95 unsigned long ans = n;
100 ans ^= (idiv=ans>>ish);
101 if(idiv <=1 || ish == 16)
int main(int argc, char *argv[])