1 #pragma once
2 
3 #ifndef TIMAGEINFO_H
4 #define TIMAGEINFO_H
5 
6 #undef DVAPI
7 #undef DVVAR
8 #ifdef TNZCORE_EXPORTS
9 #define DVAPI DV_EXPORT_API
10 #define DVVAR DV_EXPORT_VAR
11 #else
12 #define DVAPI DV_IMPORT_API
13 #define DVVAR DV_IMPORT_VAR
14 #endif
15 
16 //================================================
17 
18 //    Forward declarations
19 
20 class TPropertyGroup;
21 
22 //================================================
23 
24 //*************************************************************************
25 //    TImageInfo  class
26 //*************************************************************************
27 
28 /*!
29   \brief    Stores description data about a generic image.
30 
31   \todo     Stores useless/redundant/improper data which should be moved or
32             removed.
33 */
34 
35 class DVAPI TImageInfo {
36 public:
37   // NOTE: Fields ordered by type size - minimizes padding
38 
39   double m_dpix,    //!< Horizontal image dpi.
40       m_dpiy,       //!< Vertical image dpi.
41       m_frameRate;  //!< Movie frame rate. \deprecated Should not be here. An
42                     //! image has \a no frame rate!
43 
44   TPropertyGroup *m_properties;  //!< Format-specific image data.
45 
46   int m_lx,              //!< Image width.
47       m_ly,              //!< Image height.
48       m_x0,              //!< Image contents rect's left coordinate.
49       m_y0,              //!< Image contents rect's bottom coordinate.
50       m_x1,              //!< Image contents rect's right coordinate.
51       m_y1,              //!< Image contents rect's top coordinate.
52       m_samplePerPixel,  //!< Number of samples (channels) per pixel.
53       m_bitsPerSample,   //!< Number of bits per sample (channel).
54       m_fileSize;  //!< Total size (in bytes) of the image file. \deprecated
55                    //! Possibly useless.
56 
57   bool m_valid;  //!< \a Deprecated. \deprecated Just... wrong.
58 
59 public:
TImageInfo()60   TImageInfo()
61       : m_dpix(0)
62       , m_dpiy(0)
63       , m_frameRate(12)
64       , m_properties(0)
65       , m_lx(0)
66       , m_ly(0)
67       , m_x0(0)
68       , m_y0(0)
69       , m_x1(-1)
70       , m_y1(-1)
71       , m_samplePerPixel(0)
72       , m_bitsPerSample(8)
73       , m_fileSize(0)
74       , m_valid(false) {}
75 
TImageInfo(int lx,int ly)76   TImageInfo(int lx, int ly)
77       : m_dpix(0)
78       , m_dpiy(0)
79       , m_frameRate(12)
80       , m_properties(0)
81       , m_lx(lx)
82       , m_ly(ly)
83       , m_x0(0)
84       , m_y0(0)
85       , m_x1(-1)
86       , m_y1(-1)
87       , m_samplePerPixel(0)
88       , m_bitsPerSample(8)
89       , m_fileSize(0)
90       , m_valid(false) {}
91 };
92 
93 #endif  // TIMAGEINFO_H
94