FotoSHOCK
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
src
core
IO
Codec.hpp
1
/*
2
* Copyright 2011, 2012 Lukas Jirkovsky
3
*
4
* This file is part of FotoSHOCKcore.
5
*
6
* FotoSHOCKcore is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, version 3 of the License.
9
*
10
* FotoSHOCKcore is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with FotoSHOCKcore. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef CODEC_H
20
#define CODEC_H
21
22
#include "Formats.hpp"
23
#include "ImageBufferBase.hpp"
24
25
#include <string>
26
27
namespace
FotoSHOCKcore {
28
namespace
IO {
29
31
40
class
Decoder
{
41
public
:
43
virtual
~Decoder
();
45
52
virtual
ImageBufferBase
*
loadImage
(
unsigned
int
tileExtent) = 0;
54
61
virtual
ImageBufferBase
*
loadImage
(
unsigned
int
tileExtent,
PixelData
format) = 0;
62
protected
:
64
67
Decoder
(
const
std::string fileName);
68
const
std::string m_fileName;
69
};
70
72
83
class
Encoder
{
84
public
:
86
virtual
~Encoder
();
88
96
// TODO handle the quality
97
virtual
void
saveImage
(
ImageBufferBase
* image,
int
quality) = 0;
98
protected
:
100
103
Encoder
(
const
std::string fileName);
104
const
std::string m_fileName;
105
};
106
107
}
108
}
109
110
#endif
Generated on Sat Jun 29 2013 14:25:18 for FotoSHOCK by
1.8.4