Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TIMAGEINFO_H
Toshihiro Shimizu 890ddd
#define TIMAGEINFO_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TNZCORE_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//    Forward declarations
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TPropertyGroup;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//*************************************************************************
Toshihiro Shimizu 890ddd
//    TImageInfo  class
Toshihiro Shimizu 890ddd
//*************************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
  \brief    Stores description data about a generic image.
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
  \todo     Stores useless/redundant/improper data which should be moved or
Toshihiro Shimizu 890ddd
            removed.
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI TImageInfo
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	// NOTE: Fields ordered by type size - minimizes padding
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	double m_dpix,   //!< Horizontal image dpi.
Toshihiro Shimizu 890ddd
		m_dpiy,		 //!< Vertical image dpi.
Toshihiro Shimizu 890ddd
		m_frameRate; //!< Movie frame rate. \deprecated Should not be here. An image has \a no frame rate!
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TPropertyGroup *m_properties; //!< Format-specific image data.
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_lx,			  //!< Image width.
Toshihiro Shimizu 890ddd
		m_ly,			  //!< Image height.
Toshihiro Shimizu 890ddd
		m_x0,			  //!< Image contents rect's left coordinate.
Toshihiro Shimizu 890ddd
		m_y0,			  //!< Image contents rect's bottom coordinate.
Toshihiro Shimizu 890ddd
		m_x1,			  //!< Image contents rect's right coordinate.
Toshihiro Shimizu 890ddd
		m_y1,			  //!< Image contents rect's top coordinate.
Toshihiro Shimizu 890ddd
		m_samplePerPixel, //!< Number of samples (channels) per pixel.
Toshihiro Shimizu 890ddd
		m_bitsPerSample,  //!< Number of bits per sample (channel).
Toshihiro Shimizu 890ddd
		m_fileSize;		  //!< Total size (in bytes) of the image file. \deprecated Possibly useless.
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool m_valid; //!< \a Deprecated. \deprecated Just... wrong.
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TImageInfo()
Toshihiro Shimizu 890ddd
		: m_dpix(0), m_dpiy(0), m_frameRate(12), m_properties(0), m_lx(0), m_ly(0), m_x0(0), m_y0(0), m_x1(-1), m_y1(-1), m_samplePerPixel(0), m_bitsPerSample(8), m_fileSize(0), m_valid(false) {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TImageInfo(int lx, int ly)
Toshihiro Shimizu 890ddd
		: m_dpix(0), m_dpiy(0), m_frameRate(12), m_properties(0), m_lx(lx), m_ly(ly), m_x0(0), m_y0(0), m_x1(-1), m_y1(-1), m_samplePerPixel(0), m_bitsPerSample(8), m_fileSize(0), m_valid(false) {}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif // TIMAGEINFO_H