xref: /haiku/src/add-ons/translators/gif/GIFTranslator.h (revision 1149fa6ece3567c466008a04ae8a830a63bafdaa)
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.
13 //
14 ////////////////////////////////////////////////////////////////////////////////
15 
16 #ifndef GIFTRANSLATOR_H
17 #define GIFTRANSLATOR_H
18 
19 #include "BaseTranslator.h"
20 
21 #define GIF_IN_QUALITY		0.8
22 #define GIF_IN_CAPABILITY	0.8
23 #define BBM_IN_QUALITY		0.3
24 #define BBM_IN_CAPABILITY	0.3
25 
26 #define GIF_OUT_QUALITY		0.8
27 #define GIF_OUT_CAPABILITY	0.8
28 #define BBM_OUT_QUALITY		0.3
29 #define BBM_OUT_CAPABILITY	0.3
30 
31 // settings
32 
33 #define GIF_SETTING_INTERLACED			"interlaced"
34 #define GIF_SETTING_USE_TRANSPARENT		"use transparent"
35 #define GIF_SETTING_USE_TRANSPARENT_AUTO	"use transparent auto"
36 #define GIF_SETTING_USE_DITHERING		"use dithering"
37 #define GIF_SETTING_PALETTE_MODE		"palette mode"
38 #define GIF_SETTING_PALETTE_SIZE		"palette size"
39 #define GIF_SETTING_TRANSPARENT_RED		"transparent red"
40 #define GIF_SETTING_TRANSPARENT_GREEN		"transparent green"
41 #define GIF_SETTING_TRANSPARENT_BLUE		"transparent blue"
42 
43 
44 #define GIF_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(1,5,0)
45 
46 class GIFTranslator : public BaseTranslator {
47 	public:
48 		GIFTranslator();
49 		virtual status_t DerivedIdentify(BPositionIO* inSource,
50 			const translation_format* inFormat, BMessage* ioExtension,
51 			translator_info* outInfo, uint32 outType);
52 
53 		virtual status_t DerivedTranslate(BPositionIO* inSource,
54 			const translator_info* inInfo, BMessage* ioExtension,
55 			uint32 outType, BPositionIO* outDestination, int32 baseType);
56 
57 		virtual BView* NewConfigView(TranslatorSettings* settings);
58 
59 	protected:
60 		virtual ~GIFTranslator();
61 };
62 
63 #endif
64 
65