Subversion Repositories Scribus

Rev

Rev 11331 | Rev 12892 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5977 jghali 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
*/
5937 jghali 7
#ifndef SCIMAGESTRUCTS_H
8
#define SCIMAGESTRUCTS_H
9
 
10223 cbradney 10
#include <QImage>
9803 fschmid 11
#include <QList>
10223 cbradney 12
#include <QMap>
13
#include <QString>
14
 
5937 jghali 15
#include "fpointarray.h"
6085 fschmid 16
#include "sccolor.h"
5937 jghali 17
 
18
struct ImageLoadRequest
19
{
20
        bool visible;
6138 fschmid 21
        bool useMask;
5937 jghali 22
        ushort opacity;
23
        QString blend;
24
};
25
 
10954 jghali 26
struct ImageEffect
27
{
28
        int effectCode;
29
        QString effectParameters;
30
};
31
typedef QList<ImageEffect> ScImageEffectList;
32
 
5937 jghali 33
struct PSDHeader
34
{
35
        uint signature;
36
        ushort version;
37
        uchar reserved[6];
38
        ushort channel_count;
39
        uint height;
40
        uint width;
41
        ushort depth;
42
        ushort color_mode;
43
};
44
 
45
struct PSDLayer
46
{
9803 fschmid 47
        QList<uint> channelLen;
48
        QList<int> channelType;
5937 jghali 49
        int xpos;
50
        int ypos;
51
        int width;
52
        int height;
53
        ushort opacity;
54
        uchar clipping;
55
        uchar flags;
56
        int maskXpos;
57
        int maskYpos;
58
        int maskWidth;
59
        int maskHeight;
60
        QString layerName;
61
        QString blend;
62
        QImage thumb;
6138 fschmid 63
        QImage thumb_mask;
5937 jghali 64
};
65
 
6085 fschmid 66
struct PSDDuotone_Color
67
{
68
        QString Name;
69
        ScColor Color;
6116 fschmid 70
        FPointArray Curve;
6085 fschmid 71
};
72
 
5937 jghali 73
class ExifValues
74
{
75
public:
76
        ExifValues(void);
77
        void init(void);
78
 
79
        int width;
80
        int height;
7362 fschmid 81
        float ExposureTime;
82
        float ApertureFNumber;
83
        int   ISOequivalent;
5937 jghali 84
        QString cameraName;
85
        QString cameraVendor;
86
        QString comment;
87
        QString userComment;
88
        QString artist;
89
        QString copyright;
90
        QString dateTime;
91
        QImage thumbnail;
92
};
93
 
11331 jghali 94
typedef enum
95
{
96
        ImageTypeJPG = 0,
97
        ImageTypeTIF = 1,
98
        ImageTypePSD = 2,
99
        ImageTypeEPS = 3,
100
        ImageTypePDF = 4,
101
        ImageTypeJPG2K = 5,
102
        ImageTypeOther = 6,
103
        ImageType7 = 7
104
} ImageTypeEnum;
105
 
106
typedef enum
107
{
108
        ColorSpaceRGB  = 0,
109
        ColorSpaceCMYK = 1,
110
        ColorSpaceGray = 2,
111
        ColorSpaceDuotone = 3
112
} ColorSpaceEnum;
113
 
5937 jghali 114
class ImageInfoRecord
115
{
116
public:
117
        ImageInfoRecord(void);
118
        void init(void);
119
 
11331 jghali 120
        ImageTypeEnum type;                     /* 0 = jpg, 1 = tiff, 2 = psd, 3 = eps/ps, 4 = pdf, 5 = jpg2000, 6 = other */
121
        int  xres;
122
        int  yres;
123
        int  BBoxX;
124
        int  BBoxH;
125
        ColorSpaceEnum colorspace; /* 0 = RGB  1 = CMYK  2 = Grayscale 3 = Duotone */
5937 jghali 126
        bool valid;
127
        bool isRequest;
128
        bool progressive;
129
        bool isEmbedded;
130
        bool exifDataValid;
11331 jghali 131
        int  lowResType; /* 0 = full Resolution, 1 = 72 dpi, 2 = 36 dpi */
5937 jghali 132
        double lowResScale;
12080 avox 133
        int numberOfPages;
134
        int actualPageNumber;
5937 jghali 135
        QMap<QString, FPointArray> PDSpathData;
136
        QMap<int, ImageLoadRequest> RequestProps;
137
        QString clipPath;
138
        QString usedPath;
139
        QString profileName;
9803 fschmid 140
        QList<PSDLayer> layerInfo;
141
        QList<PSDDuotone_Color> duotoneColors;
5937 jghali 142
        ExifValues exifInfo;
143
};
144
 
145
#endif