Scribus
Open source desktop publishing at your fingertips
scimagestructs.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 SCIMAGESTRUCTS_H
8 #define SCIMAGESTRUCTS_H
9 
10 #include <QImage>
11 #include <QList>
12 #include <QMap>
13 #include <QString>
14 
15 #include "fpointarray.h"
16 #include "sccolor.h"
17 
18 class ScImageCacheProxy;
19 
21 {
22  bool visible;
23  bool useMask;
24  ushort opacity;
25  QString blend;
26  bool operator==(const ImageLoadRequest &rhs) const
27  {
28  return visible == rhs.visible && useMask == rhs.useMask && opacity == rhs.opacity && blend == rhs.blend;
29  }
30 };
31 
33 {
34  int effectCode;
35  QString effectParameters;
36 };
37 typedef QList<ImageEffect> ScImageEffectList;
38 
39 struct PSDHeader
40 {
41  uint signature;
42  ushort version;
43  uchar reserved[6];
44  ushort channel_count;
45  uint height;
46  uint width;
47  ushort depth;
48  ushort color_mode;
49 };
50 
51 struct PSDLayer
52 {
53  QList<uint> channelLen;
54  QList<int> channelType;
55  int xpos;
56  int ypos;
57  int width;
58  int height;
59  ushort opacity;
60  uchar clipping;
61  uchar flags;
62  int maskXpos;
63  int maskYpos;
64  int maskWidth;
65  int maskHeight;
66  QString layerName;
67  QString blend;
68  QImage thumb;
69  QImage thumb_mask;
70 };
71 
73 {
74  QString Name;
75  ScColor Color;
76  FPointArray Curve;
77 };
78 
80 {
81 public:
82  ExifValues(void);
83  void init(void);
84 
85  // Remember to increment this version number and update
86  // the QDataStream operators if this class in changed.
87  static const qint32 dsVersion;
88 
89  int width;
90  int height;
91  int orientation;
92  float ExposureTime;
93  float ApertureFNumber;
94  int ISOequivalent;
95  QString cameraName;
96  QString cameraVendor;
97  QString comment;
98  QString userComment;
99  QString artist;
100  QString copyright;
101  QString dateTime;
102  QImage thumbnail;
103 };
104 
105 typedef enum
106 {
107  ImageTypeJPG = 0,
108  ImageTypeTIF = 1,
109  ImageTypePSD = 2,
110  ImageTypeEPS = 3,
111  ImageTypePDF = 4,
112  ImageTypeJPG2K = 5,
113  ImageTypeOther = 6,
114  ImageType7 = 7
115 } ImageTypeEnum;
116 
117 typedef enum
118 {
119  ColorSpaceRGB = 0,
120  ColorSpaceCMYK = 1,
121  ColorSpaceGray = 2,
122  ColorSpaceDuotone = 3,
123  ColorSpaceMonochrome = 4
124 } ColorSpaceEnum;
125 
127 {
128 public:
129  ImageInfoRecord(void);
130  void init(void);
131 
132  // Remember to increment this version number and update
133  // the serialization routines if this class in changed.
134  static const int iirVersion;
135 
136  bool canSerialize() const;
137  bool serialize(ScImageCacheProxy & cache) const;
138  bool deserialize(const ScImageCacheProxy & cache);
139 
140  ImageTypeEnum type; /* 0 = jpg, 1 = tiff, 2 = psd, 3 = eps/ps, 4 = pdf, 5 = jpg2000, 6 = other */
141  int xres;
142  int yres;
143  int BBoxX;
144  int BBoxH;
145  ColorSpaceEnum colorspace; /* 0 = RGB 1 = CMYK 2 = Grayscale 3 = Duotone */
146  bool valid;
147  bool isRequest;
148  bool progressive;
149  bool isEmbedded;
150  bool exifDataValid;
151  int lowResType; /* 0 = full Resolution, 1 = 72 dpi, 2 = 36 dpi */
152  double lowResScale;
153  int numberOfPages;
154  int actualPageNumber;
155  QMap<QString, FPointArray> PDSpathData;
156  QMap<int, ImageLoadRequest> RequestProps;
157  QString clipPath;
158  QString usedPath;
159  QString profileName;
160  QList<PSDLayer> layerInfo;
161  QList<PSDDuotone_Color> duotoneColors;
162  ExifValues exifInfo;
163 };
164 
165 #endif
Definition: scimagestructs.h:72
Definition: sccolor.h:51
Definition: scimagestructs.h:20
Definition: scimagestructs.h:32
Scribus image cache proxy.
Definition: scimagecacheproxy.h:39
Definition: scimagestructs.h:39
Definition: fpointarray.h:42
Definition: scimagestructs.h:51
Definition: scimagestructs.h:79
Definition: scimagestructs.h:126