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// Additional authors:	John Scipione, <jscipione@gmail.com>
17
18#ifndef GIF_TRANSLATOR_H
19#define GIF_TRANSLATOR_H
20
21
22#include "BaseTranslator.h"
23
24
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
29
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
34
35#define GIF_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(1, 5, 0)
36
37// settings
38
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"
48
49
50class GIFTranslator : public BaseTranslator {
51public:
52								GIFTranslator();
53	virtual	status_t			DerivedIdentify(BPositionIO* inSource,
54									const translation_format* inFormat,
55									BMessage* ioExtension,
56									translator_info* outInfo, uint32 outType);
57
58	virtual	status_t			DerivedTranslate(BPositionIO* inSource,
59									const translator_info* inInfo,
60									BMessage* ioExtension,
61									uint32 outType, BPositionIO* outDestination,
62									int32 baseType);
63
64	virtual	BView*				NewConfigView(TranslatorSettings* settings);
65
66protected:
67	virtual						~GIFTranslator();
68};
69
70
71#endif	// GIF_TRANSLATOR_H
72