-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPPMImage.h
More file actions
32 lines (31 loc) · 992 Bytes
/
PPMImage.h
File metadata and controls
32 lines (31 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "Image.h"
#include "ColorPixel.h"
class PPM : public Image
{
private:
ColorPixel** pixel;
ColorPixel** copyofPixel();
void deletecopyofPixel(ColorPixel**);
public:
PPM(const char* mN = "",unsigned int w = 0, unsigned int h = 0, const char* n = "", unsigned int mC = 0);
PPM(std::string mN = "", unsigned int w = 0, unsigned int h = 0, std::string n = "", unsigned int mC = 256);
PPM(const PPM& other);
PPM& operator=(const PPM& other);
~PPM();
void createPixels(unsigned int, unsigned int);
void deletePixels();
void copyPixels(const PPM&);
void readPixels(std::istream& in);
void readPixels();
void printPixels(std::ostream& out);
void printPixels();
void rotate(std::string direction);
void grayscale();
void monochrome();
void negative();
Image* getCopy();
void save(std::ostream& out);
friend std::istream& operator>>(std::istream& in, PPM& pp);
friend std::ostream& operator<<(std::ostream& out, PPM& pp);
};