#include "Image.hpp" Image::Image() { taillex=tailley=0; pix=NULL; } Image::Image(string chemin) { ifstream is(chemin.c_str()); int ret; string mn; assert(is.is_open()); is >> mn; assert(!mn.compare("P3")); is >> taillex; is >> tailley; pix=new Pixel[taillex*tailley]; assert(pix != NULL); is >> ret; for(int i=0;i> pix[i][0]; is >> pix[i][1]; is >> pix[i][2]; } is.close(); } Image::Image(int tx, int ty, int *canal1, int *canal2, int *canal3) { taillex=tx; tailley=ty; pix=new Pixel[tx*ty]; assert(pix != NULL); for(int i=0;i