2 * Copyright 2013, Gerasim Troeglazov, 3dEyes@gmail.com. All rights reserved.
3 * Distributed under the terms of the MIT License.
7 #ifndef PSD_TRANSLATOR_H
8 #define PSD_TRANSLATOR_H
10 #include "BaseTranslator.h"
12 #include <Translator.h>
13 #include <TranslatorFormats.h>
14 #include <TranslationDefs.h>
15 #include <GraphicsDefs.h>
16 #include <InterfaceDefs.h>
19 #include <ByteOrder.h>
21 #define DOCUMENT_COUNT "/documentCount"
22 #define DOCUMENT_INDEX "/documentIndex"
24 #define PSD_SETTING_COMPRESSION "psd /compression"
25 #define PSD_SETTING_VERSION "psd /psdversion"
27 #define PSD_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(1, 3, 0)
28 #define PSD_IMAGE_FORMAT 'PSD '
30 #define PSD_IN_QUALITY 0.7
31 #define PSD_IN_CAPABILITY 0.6
32 #define PSD_OUT_QUALITY 0.5
33 #define PSD_OUT_CAPABILITY 0.6
35 #define BITS_IN_QUALITY 0.7
36 #define BITS_IN_CAPABILITY 0.6
37 #define BITS_OUT_QUALITY 0.7
38 #define BITS_OUT_CAPABILITY 0.6
40 class PSDTranslator
: public BaseTranslator
{
44 virtual status_t
DerivedIdentify(BPositionIO
*inSource
,
45 const translation_format
*inFormat
, BMessage
*ioExtension
,
46 translator_info
*outInfo
, uint32 outType
);
48 virtual status_t
DerivedTranslate(BPositionIO
*inSource
,
49 const translator_info
*inInfo
, BMessage
*ioExtension
,
50 uint32 outType
, BPositionIO
*outDestination
, int32 baseType
);
52 virtual status_t
DerivedCanHandleImageSize(float width
,
55 virtual BView
*NewConfigView(TranslatorSettings
*settings
);
58 virtual ~PSDTranslator();
61 extern const char *kDocumentCount
;
62 extern const char *kDocumentIndex
;
64 #endif /* PSD_TRANSLATOR_H */