Fawkes API
Fawkes Development Version
imagecompressor.cpp
1
2
/***************************************************************************
3
* imagecompressor.cpp - image compressor interface
4
*
5
* Generated: Thu Mar 29 01:39:05 2007
6
* Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#include <fvutils/compression/imagecompressor.h>
25
26
namespace
firevision
{
27
#if 0
/* just to make Emacs auto-indent happy */
28
}
29
#endif
30
31
/** @class ImageCompressor <fvutils/compression/imagecompressor.h>
32
* Image compressor interface.
33
*
34
*
35
* @fn void ImageCompressor::set_image_dimensions(unsigned int width, unsigned int height)
36
* Set dimensions of image to compress.
37
* @param width width of image in pixels
38
* @param height height of image in pixels
39
*
40
* @fn void ImageCompressor::set_image_buffer(colorspace_t cspace, unsigned char *buffer)
41
* Set image buffer to compress
42
* @param cspace colorspace of image
43
* @param buffer buffer that contains the image
44
*
45
* @fn void ImageCompressor::set_destination_buffer(unsigned char *buf, unsigned int buf_size)
46
* Set destination buffer (if compressing to memory).
47
* @param buf buffer
48
* @param buf_size buffer size
49
*
50
* @fn size_t ImageCompressor::compressed_size()
51
* Get compressed size.
52
* @return compressed size
53
*
54
* @fn void ImageCompressor::set_filename(const char *filename)
55
* Set file name.
56
* @param filename file name (if compressing to file)
57
*
58
* @fn void ImageCompressor::set_compression_destination(CompressionDestination cd)
59
* Set compression destination.
60
* @param cd compression destination
61
*
62
* @fn bool ImageCompressor::supports_compression_destination(CompressionDestination cd)
63
* Check if compressor supports desired compression destination.
64
* @param cd compression destination
65
* @return true if supported, false otherwise
66
*
67
* @fn size_t ImageCompressor::recommended_compressed_buffer_size()
68
* Get the recommended size for the compressed buffer. It is not guaranteed
69
* that this size is really enough for compression but in most cases this should
70
* be suitable.
71
* @return recommended buffer size
72
*
73
* @fn void ImageCompressor::compress()
74
* Compress image.
75
*
76
* @fn bool ImageCompressor::supports_vflip()
77
* Check if image compressor can do vflip during compress.
78
*
79
* Vertical flipping (having the image upside down) is an operation
80
* necessary for example for cameras hanging upside down. During
81
* compression when the buffer is typically copied or converted
82
* line-wise anyway, this is a particularly cheap operation. Therfore
83
* we provide an API to implement this.
84
* @return true, if the image compressor supports vflipping, false
85
* otherwise.
86
*
87
* @fn void ImageCompressor::set_vflip(bool enable)
88
* Enable or disable vflipping.
89
* This shall throw an exception if vflipping is not supported.
90
* @param enable true to enable vflipping, false to disable
91
* @exception Exception thrown if vflipping is not supported.
92
*/
93
94
/** Virtual empty destructor. */
95
ImageCompressor::~ImageCompressor
()
96
{
97
}
98
99
}
// end namespace firevision
firevision
Definition:
vision_master.h:32
firevision::ImageCompressor::~ImageCompressor
virtual ~ImageCompressor()
Virtual empty destructor.
Definition:
imagecompressor.cpp:95
src
libs
fvutils
compression
imagecompressor.cpp
Generated by
1.8.13