-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImage.h
More file actions
42 lines (41 loc) · 1.34 KB
/
Copy pathImage.h
File metadata and controls
42 lines (41 loc) · 1.34 KB
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
33
34
35
36
37
38
39
40
41
42
#pragma once
#pragma warning(disable : 4996)
#include <iostream>
#include <string>
#include <cassert>
class Image
{
protected:
std::string magicNumber;
unsigned int width;
unsigned int height;
std::string name;
unsigned int maxColor;
public:
Image();
Image(const char* mN ="",unsigned int w = 0, unsigned int h = 0, const char* n = "",unsigned int mC = 0);
Image(std::string mN = "", unsigned int w = 0, unsigned int h = 0, std::string n = "", unsigned int mC = 0);
Image(const Image& other);
Image& operator=(const Image& other);
virtual ~Image();
void getInfo();
std::string getName()const { return name; }
std::string getMagicNumber() const { return magicNumber; }
unsigned const int getWidth()const { return width; }
unsigned const int getHeight()const { return height; }
unsigned const int getMaxColor()const { return maxColor; }
void setMagicNumber(const char* mN);
void setName(std::string);
void setWidth(int);
void setHeight(int);
virtual Image* getCopy();
virtual void readPixels() = 0;
virtual void readPixels(std::istream&) = 0;
virtual void printPixels() = 0;
virtual void printPixels(std::ostream&) = 0;
virtual void grayscale() = 0;
virtual void monochrome() = 0;
virtual void negative() = 0;
virtual void rotate(std::string direction) = 0;
virtual void save(std::ostream&) = 0;
};