finaly works on mac
This commit is contained in:
parent
dcd8229010
commit
69ce3665c6
2 changed files with 8 additions and 8 deletions
14
Canvas.cpp
14
Canvas.cpp
|
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -11,5 +11,5 @@
|
|||
#else
|
||||
#define WIDTH 800
|
||||
#define HEIGHT 800
|
||||
#define ITERATIONS 20000000
|
||||
#define ITERATIONS 20000
|
||||
#endif
|
||||
|
|
Reference in a new issue