/* */
#include “AsciiImageClass.h”
using namespace std;
AsciiImage::AsciiImage() : width(0), height(0), maxColor(0) {
}
void AsciiImage::inputImage(istream& fin)
{
readHeader(fin);
cout << “Header has been read. \n”
<< magicNumber << endl << “height,width,maxcolor are :”
<< height << ‘ ‘<<width<<” “<<maxColor << endl;
if(strcmp(magicNumber,”P3″) == 0)
}
}
else{
cout << “magicNumber ” << magicNumber
<< ” not supported.” << endl;
}
}
void AsciiImage::writeP3Image(ostream& out)
{
int counter(0);
for(string s: comment){
out << s << endl;
cout << s << endl;
}
}
}
}//end for i