Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
lossy.h
1
2
/***************************************************************************
3
* lossy.h - lossy scaler, will just through away information, can only
4
* downscale images!
5
*
6
* Generated: Tue May 16 14:57:16 2006 (Automatica 2006)
7
* Copyright 2005-2006 Tim Niemueller [www.niemueller.de]
8
*
9
****************************************************************************/
10
11
/* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version. A runtime exception applies to
15
* this software (see LICENSE.GPL_WRE file mentioned below for details).
16
*
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU Library General Public License for more details.
21
*
22
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23
*/
24
25
#ifndef __FIREVISION_UTILS_SCALERS_LOSSY_H_
26
#define __FIREVISION_UTILS_SCALERS_LOSSY_H_
27
28
#include <fvutils/scalers/scaler.h>
29
30
namespace
firevision {
31
#if 0
/* just to make Emacs auto-indent happy */
32
}
33
#endif
34
35
class
LossyScaler
:
public
Scaler
{
36
37
public
:
38
LossyScaler
();
39
virtual
~
LossyScaler
();
40
41
virtual
void
set_scale_factor(
float
factor);
42
virtual
void
set_original_dimensions(
unsigned
int
width,
43
unsigned
int
height);
44
virtual
void
set_scaled_dimensions(
unsigned
int
width,
45
unsigned
int
height);
46
virtual
void
set_original_buffer(
unsigned
char
*buffer);
47
virtual
void
set_scaled_buffer(
unsigned
char
*buffer);
48
virtual
void
scale();
49
virtual
unsigned
int
needed_scaled_width();
50
virtual
unsigned
int
needed_scaled_height();
51
virtual
float
get_scale_factor();
52
53
private
:
54
unsigned
int
orig_width;
55
unsigned
int
orig_height;
56
unsigned
char
*orig_buffer;
57
58
unsigned
int
scal_width;
59
unsigned
int
scal_height;
60
unsigned
char
*scal_buffer;
61
62
float
scale_factor;
63
64
};
65
66
}
// end namespace firevision
67
68
#endif
firevision::LossyScaler
Lossy image scaler.
Definition:
lossy.h:35
firevision::Scaler
Image scaler interface.
Definition:
scaler.h:32
src
libs
fvutils
scalers
lossy.h
Generated by
1.8.7