Scribus
Open source desktop publishing at your fingertips
scimgdataloader_tiff.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef SCIMGDATALOADER_TIFF_H
8 #define SCIMGDATALOADER_TIFF_H
9 
10 #include <tiffio.h>
11 #include "scimgdataloader.h"
12 //Added by qt3to4:
13 #include <QList>
14 
16 {
17 protected:
18 
19  enum PSDColorMode
20  {
21  CM_BITMAP = 0,
22  CM_GRAYSCALE = 1,
23  CM_INDEXED = 2,
24  CM_RGB = 3,
25  CM_CMYK = 4,
26  CM_MULTICHANNEL = 7,
27  CM_DUOTONE = 8,
28  CM_LABCOLOR = 9
29  };
30  void initSupportedFormatList();
31  int getLayers(const QString& fn, int page);
32  bool getImageData(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 photometric, uint16 bitspersample, uint16 samplesperpixel, bool &bilevel, bool &isCMYK);
33  bool getImageData_RGBA(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 bitspersample, uint16 samplesperpixel);
34  void blendOntoTarget(RawImage *tmp, int layOpa, QString layBlend, bool cmyk, bool useMask);
35  QString getLayerString(QDataStream & s);
36  bool loadChannel( QDataStream & s, const PSDHeader & header, QList<PSDLayer> &layerInfo, uint layer, int channel, int component, RawImage &tmpImg);
37  bool loadLayerInfo(QDataStream & s, QList<PSDLayer> &layerInfo);
38  bool loadLayerChannels( QDataStream & s, const PSDHeader & header, QList<PSDLayer> &layerInfo, uint layer, bool* firstLayer);
39 
40  bool testAlphaChannelAvailability(const QString& fn, int page, bool& hasAlpha);
41  void unmultiplyRGBA(RawImage *image);
42 
43  int random_table[4096];
44  uint16 photometric, samplesperpixel;
45 
46 public:
48 
49 // virtual void preloadAlphaChannel(const QString& fn, int res);
50  virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
51  virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
52  virtual bool loadPicture(const QString& fn, int page, int res, bool thumbnail);
53 
54  virtual bool useRawImage() { return true; }
55 };
56 
57 #endif
Definition: scimgdataloader.h:19
Definition: rawimage.h:15
Definition: scimgdataloader_tiff.h:15
Definition: scimagestructs.h:39