Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main () {
- ofstream myfile;
- myfile.open ("slika.ppm");
- int hres = 100;
- int vres = 100;
- myfile << "P3 " << hres << " " << vres << " " << "255\n";
- for(int i = 0; i < hres; i++)
- {
- for(int j = 0; j < vres; j++)
- {
- myfile << 255 << " " << 0 << " " << 0 << "\n";
- }
- }
- myfile.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement