The file gets more kB then the original ( 114KB to 914KB)
And something weird: when I try open the new file with the notepad, it loads forever and i get a program not responding message when I try to close it, with the original file it loads ok..
By the way the new file opens ok, its a pbm image file..
I guess Im missing something that I have to do when writing to binary files?
ofstream writer("out.pbm", ios::binary);
writer << MV[0] << MV[1] << '\n';
writer <<"# Created by me"<< '\n';
writer << width << ' ' << height << '\n';
for(long i=0; i < (width*height); i++){
writer.write(&img_pix[i].rgbb[0],1);
}
writer.close();
edit: My program just loads the file , store its information and save it..