vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / translators / gif / GIFTranslator.h
blob7904e19706d284a203a7071fe09274352a3a0e11
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: GIFTranslator.h
4 //
5 // Date: December 1999
6 //
7 // Author: Daniel Switkin
8 //
9 // Copyright 2003 (c) by Daniel Switkin. This file is made publically available
10 // under the BSD license, with the stipulations that this complete header must
11 // remain at the top of the file indefinitely, and credit must be given to the
12 // original author in any about box using this software.
14 ////////////////////////////////////////////////////////////////////////////////
16 // Additional authors: John Scipione, <jscipione@gmail.com>
18 #ifndef GIF_TRANSLATOR_H
19 #define GIF_TRANSLATOR_H
22 #include "BaseTranslator.h"
25 #define GIF_IN_QUALITY 0.8
26 #define GIF_IN_CAPABILITY 0.8
27 #define BBM_IN_QUALITY 0.3
28 #define BBM_IN_CAPABILITY 0.3
30 #define GIF_OUT_QUALITY 0.8
31 #define GIF_OUT_CAPABILITY 0.8
32 #define BBM_OUT_QUALITY 0.3
33 #define BBM_OUT_CAPABILITY 0.3
35 #define GIF_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(1, 5, 0)
37 // settings
39 #define GIF_SETTING_INTERLACED "interlaced"
40 #define GIF_SETTING_USE_TRANSPARENT "use transparent"
41 #define GIF_SETTING_USE_TRANSPARENT_AUTO "use transparent auto"
42 #define GIF_SETTING_USE_DITHERING "use dithering"
43 #define GIF_SETTING_PALETTE_MODE "palette mode"
44 #define GIF_SETTING_PALETTE_SIZE "palette size"
45 #define GIF_SETTING_TRANSPARENT_RED "transparent red"
46 #define GIF_SETTING_TRANSPARENT_GREEN "transparent green"
47 #define GIF_SETTING_TRANSPARENT_BLUE "transparent blue"
50 class GIFTranslator : public BaseTranslator {
51 public:
52 GIFTranslator();
53 virtual status_t DerivedIdentify(BPositionIO* inSource,
54 const translation_format* inFormat,
55 BMessage* ioExtension,
56 translator_info* outInfo, uint32 outType);
58 virtual status_t DerivedTranslate(BPositionIO* inSource,
59 const translator_info* inInfo,
60 BMessage* ioExtension,
61 uint32 outType, BPositionIO* outDestination,
62 int32 baseType);
64 virtual BView* NewConfigView(TranslatorSettings* settings);
66 protected:
67 virtual ~GIFTranslator();
71 #endif // GIF_TRANSLATOR_H