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
26namespace firevision {
27
28/** @class ImageCompressor <fvutils/compression/imagecompressor.h>
29 * Image compressor interface.
30 *
31 *
32 * @fn void ImageCompressor::set_image_dimensions(unsigned int width, unsigned int height)
33 * Set dimensions of image to compress.
34 * @param width width of image in pixels
35 * @param height height of image in pixels
36 *
37 * @fn void ImageCompressor::set_image_buffer(colorspace_t cspace, unsigned char *buffer)
38 * Set image buffer to compress
39 * @param cspace colorspace of image
40 * @param buffer buffer that contains the image
41 *
42 * @fn void ImageCompressor::set_destination_buffer(unsigned char *buf, unsigned int buf_size)
43 * Set destination buffer (if compressing to memory).
44 * @param buf buffer
45 * @param buf_size buffer size
46 *
47 * @fn size_t ImageCompressor::compressed_size()
48 * Get compressed size.
49 * @return compressed size
50 *
51 * @fn void ImageCompressor::set_filename(const char *filename)
52 * Set file name.
53 * @param filename file name (if compressing to file)
54 *
55 * @fn void ImageCompressor::set_compression_destination(CompressionDestination cd)
56 * Set compression destination.
57 * @param cd compression destination
58 *
59 * @fn bool ImageCompressor::supports_compression_destination(CompressionDestination cd)
60 * Check if compressor supports desired compression destination.
61 * @param cd compression destination
62 * @return true if supported, false otherwise
63 *
64 * @fn size_t ImageCompressor::recommended_compressed_buffer_size()
65 * Get the recommended size for the compressed buffer. It is not guaranteed
66 * that this size is really enough for compression but in most cases this should
67 * be suitable.
68 * @return recommended buffer size
69 *
70 * @fn void ImageCompressor::compress()
71 * Compress image.
72 *
73 * @fn bool ImageCompressor::supports_vflip()
74 * Check if image compressor can do vflip during compress.
75 *
76 * Vertical flipping (having the image upside down) is an operation
77 * necessary for example for cameras hanging upside down. During
78 * compression when the buffer is typically copied or converted
79 * line-wise anyway, this is a particularly cheap operation. Therfore
80 * we provide an API to implement this.
81 * @return true, if the image compressor supports vflipping, false
82 * otherwise.
83 *
84 * @fn void ImageCompressor::set_vflip(bool enable)
85 * Enable or disable vflipping.
86 * This shall throw an exception if vflipping is not supported.
87 * @param enable true to enable vflipping, false to disable
88 * @exception Exception thrown if vflipping is not supported.
89 */
90
91/** Virtual empty destructor. */
93{
94}
95
96} // end namespace firevision
virtual ~ImageCompressor()
Virtual empty destructor.