-
Notifications
You must be signed in to change notification settings - Fork 1
/
Image.h
37 lines (32 loc) · 878 Bytes
/
Image.h
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
#ifndef Image_H_
#define Image_H_
#include "Pixel.h"
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
class Image {
public:
Image();
Image(char *file);
Image(int w, int h);
~Image();
Image(const Image& other);
int get_width() const;
int get_height() const;
Color get_Color_x_y(int x, int y) const;
Pixel **get_ptr();
void setColor(int i, int j, int r, int g, int b);
Image& operator=(Image const &other);
friend Image operator+(Image const &image1, Image const &image2);
friend Image operator*(float const &f, Image const &image);
friend istream& operator>>(istream &is, Image &image);
friend ostream& operator<<(ostream &os, Image &image);
Image reflectionAboutY();
Image reflectionAboutX();
protected:
int width, height;
int maxColor;
Pixel **ptr;
};
#endif