summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-12-29 11:24:02 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-12-29 11:24:02 +0100
commitaa64d64d904f2057f8367e9b0ee8f1441d1b7573 (patch)
treee9de325c635cd2bc17ae6b52c91879f444a3f40c /tools.h
parentd877846cc97f635f60c09c0aac7b38a90c263c0c (diff)
downloadvdr-aa64d64d904f2057f8367e9b0ee8f1441d1b7573.tar.gz
vdr-aa64d64d904f2057f8367e9b0ee8f1441d1b7573.tar.bz2
Converting a grabbed image to JPEG is now done with the new function RgbToJpeg()
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools.h b/tools.h
index 64c18238..9829209e 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.85 2005/12/17 11:09:37 kls Exp $
+ * $Id: tools.h 1.86 2005/12/29 11:09:43 kls Exp $
*/
#ifndef __TOOLS_H
@@ -121,6 +121,15 @@ cString DayDateTime(time_t t = 0);
cString TimeToString(time_t t);
cString DateString(time_t t);
cString TimeString(time_t t);
+uchar *RgbToJpeg(uchar *Mem, int Width, int Height, int &Size, int Quality = 100);
+ ///< Converts the given Memory to a JPEG image and returns a pointer
+ ///< to the resulting image. Mem must point to a data block of exactly
+ ///< (Width * Height) triplets of RGB image data bytes. Upon return, Size
+ ///< will hold the number of bytes of the resulting JPEG data.
+ ///< Quality can be in the range 0..100 and controls the quality of the
+ ///< resulting image, where 100 is "best". The caller takes ownership of
+ ///< the result and has to delete it once it is no longer needed.
+ ///< The result may be NULL in case of an error.
class cTimeMs {
private: