Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scimgdataloader_tiff.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef SCIMGDATALOADER_TIFF_H
00008 #define SCIMGDATALOADER_TIFF_H
00009 
00010 #include <tiffio.h>
00011 #include "scimgdataloader.h"
00012 
00013 class ScImgDataLoader_TIFF : public ScImgDataLoader
00014 {
00015 protected:
00016 
00017        enum PSDColorMode
00018        {
00019               CM_BITMAP = 0,
00020               CM_GRAYSCALE = 1,
00021               CM_INDEXED = 2,
00022               CM_RGB = 3,
00023               CM_CMYK = 4,
00024               CM_MULTICHANNEL = 7,
00025               CM_DUOTONE = 8,
00026               CM_LABCOLOR = 9
00027        };
00028        void initSupportedFormatList();
00029        int getLayers(const QString& fn);
00030        bool getImageData(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 photometric, uint16 bitspersample, uint16 samplesperpixel, bool &bilevel, bool &isCMYK);
00031        void blendOntoTarget(RawImage *tmp, int layOpa, QString layBlend, bool cmyk, bool useMask);
00032        QString getLayerString(QDataStream & s);
00033        bool loadChannel( QDataStream & s, const PSDHeader & header, QValueList<PSDLayer> &layerInfo, uint layer, int channel, int component, RawImage &tmpImg);
00034        bool loadLayerChannels( QDataStream & s, const PSDHeader & header, QValueList<PSDLayer> &layerInfo, uint layer, bool* firstLayer);
00035        int random_table[4096];
00036        uint16 photometric, samplesperpixel;
00037 
00038 public:
00039        ScImgDataLoader_TIFF(void);
00040 
00041        virtual void preloadAlphaChannel(const QString& fn, int res);
00042        virtual void loadEmbeddedProfile(const QString& fn);
00043        virtual bool loadPicture(const QString& fn, int res, bool thumbnail);
00044 };
00045 
00046 #endif