|
|
@ -6,7 +6,7 @@ |
|
|
|
//#include <cstdint>
|
|
|
|
using namespace std; |
|
|
|
|
|
|
|
//#include "pngwriter/pngwriter.h"
|
|
|
|
#include "pngwriter/pngwriter.h" |
|
|
|
|
|
|
|
#include "Canvas.hpp" |
|
|
|
|
|
|
@ -148,9 +148,9 @@ void Canvas::output_file(const char * filename){ |
|
|
|
power[i] = vibrancy*power[i] + (1.0 - vibrancy)*averagePower; |
|
|
|
} |
|
|
|
|
|
|
|
//pngwriter * pngFile = new pngwriter(width, height, 0.0, filename);
|
|
|
|
//pngFile->setcompressionlevel(9);
|
|
|
|
//pngFile->settext("Attractor", "Joshua Moerman", "A awesome attractor", "AwesomeAttractor");
|
|
|
|
pngwriter * pngFile = new pngwriter(width, height, 0.0, filename); |
|
|
|
pngFile->setcompressionlevel(9); |
|
|
|
pngFile->settext("Attractor", "Joshua Moerman", "A awesome attractor", "AwesomeAttractor"); |
|
|
|
|
|
|
|
for ( unsigned int x = 0; x < width; x++ ) { |
|
|
|
for ( unsigned int y = 0; y < height; y++ ) { |
|
|
@ -177,7 +177,7 @@ void Canvas::output_file(const char * filename){ |
|
|
|
} |
|
|
|
} |
|
|
|
//pngwriter clips values for me
|
|
|
|
//pngFile->plot(x, y, r, g, b);
|
|
|
|
pngFile->plot(x, y, r, g, b); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -185,7 +185,7 @@ void Canvas::output_file(const char * filename){ |
|
|
|
delete max_int; |
|
|
|
delete power; |
|
|
|
|
|
|
|
cout << "ready for writing file i suppose" << endl; |
|
|
|
cout << "ready for writing file i suppose: " << filename << endl; |
|
|
|
|
|
|
|
ofstream file(filename); |
|
|
|
if ( !file ) { |
|
|
@ -194,7 +194,7 @@ void Canvas::output_file(const char * filename){ |
|
|
|
cout << filename << endl; |
|
|
|
|
|
|
|
|
|
|
|
//pngFile->close();
|
|
|
|
pngFile->close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|