-
Notifications
You must be signed in to change notification settings - Fork 0
/
PPM.h
40 lines (28 loc) · 1.19 KB
/
PPM.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
38
39
40
#ifndef FORMAT_H
#define FORMAT_H
#include<string>
#include<vector>
#include<fstream>
#include<iostream>
#include"RGB.h"
#include"Formats.h"
class PPM:public Formats
{
private:
int maxValue;
std::vector<std::vector<RGB>>pixels;
public:
PPM();
~PPM();
void load(std::string path) override;//Ôóíêöèÿ çà ïðî÷èòàíå íà èíôîðìàöèÿ îò èçîáðàæåíèÿ.
void saveas(std::string path) const override;//Ôóíêöèÿ çà çàïàçâàíå íà èíôîðìàöèÿ îò èçîáðàæåíèå âúâ ôàéë, ðàçëè÷åí îò èçõîäíèÿ.
void print(std::ostream& out) const override;//Ôóíêöèÿ çà èçâåæäàíå íà èíôîðìàöèÿ çà äàäåí ôîðìàò.
void grayscale()override;//Ïðîìåíÿ ïèêñåëèòå äà ñà â ñèâ íþàíñ.
void monochrome()override;//Ïðîìåíÿ ïèêñåëèòå äà ñà ÷åðíè èëè áåëè.
void negative() override;//Öâåòîâî îáðúùàíå.
void rotation(std::string direction) override;//Çàâúðòàíå íà èçîáðàæåíèåòî íà 90° â çàâèñèìîñò îò çàäàäåíàòà ïîñîêà.
void collage(std::string direction, std::string image1, std::string image2, std::string outimage) override;//Ñúçäàâàíå íà êîëàæ.
void undoGrayscale()override;//Ôóíêöèÿ çà ïðåìàõâàíå íà ñèâè íþàíñè.
void undoMonochrome()override;//Ôóíêöèÿ çà ïðåìàõâàíå íà ÷åðíî/áåëè íþàíñè.
};
#endif