271 lines
5.1 KiB
C++
271 lines
5.1 KiB
C++
#ifndef _JPGIMG_IMAGEINFO_HPP_
|
|
#define _JPGIMG_IMAGEINFO_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _JPGIMG_RGB888_HPP_
|
|
#include <jpgimg/rgb888.hpp>
|
|
#endif
|
|
|
|
class ImageInfo
|
|
{
|
|
public:
|
|
ImageInfo(void);
|
|
ImageInfo(const ImageInfo &someImageInfo);
|
|
virtual ~ImageInfo();
|
|
ImageInfo &operator=(const ImageInfo &someImageInfo);
|
|
bool operator==(const ImageInfo &someImageInfo)const;
|
|
void setSrcParams(DWORD width,DWORD height,RGB888 *srcRGB888);
|
|
void setDstParams(DWORD width,DWORD height,RGB888 *dstRGB888);
|
|
DWORD srcWidth(void)const;
|
|
void srcWidth(DWORD srcWidth);
|
|
DWORD srcHeight(void)const;
|
|
void srcHeight(DWORD srcHeight);
|
|
RGB888 *srcRGB888(void);
|
|
void srcRGB888(RGB888 *srcRGB888);
|
|
DWORD dstWidth(void)const;
|
|
void dstWidth(DWORD dstWidth);
|
|
DWORD dstHeight(void)const;
|
|
void dstHeight(DWORD dstHeight);
|
|
RGB888 *dstRGB888(void);
|
|
void dstRGB888(RGB888 *dstRGB888);
|
|
DWORD srcRow(void)const;
|
|
void srcRow(DWORD srcRow);
|
|
DWORD srcCol(void)const;
|
|
void srcCol(DWORD srcCol);
|
|
DWORD dstRow(void)const;
|
|
void dstRow(DWORD dstRow);
|
|
DWORD dstCol(void)const;
|
|
void dstCol(DWORD dstCol);
|
|
DWORD srcWidthFactor(void)const;
|
|
void srcWidthFactor(DWORD srcWidthFactor);
|
|
DWORD dstWidthFactor(void)const;
|
|
void dstWidthFactor(DWORD dstWidthFactor);
|
|
private:
|
|
DWORD mSrcWidth;
|
|
DWORD mSrcHeight;
|
|
RGB888 *mpSrcRGB888;
|
|
DWORD mDstWidth;
|
|
DWORD mDstHeight;
|
|
RGB888 *mpDstRGB888;
|
|
DWORD mSrcRow;
|
|
DWORD mSrcCol;
|
|
DWORD mDstRow;
|
|
DWORD mDstCol;
|
|
DWORD mSrcWidthFactor;
|
|
DWORD mDstWidthFactor;
|
|
};
|
|
|
|
inline
|
|
ImageInfo::ImageInfo(void)
|
|
: mSrcWidth(0), mSrcHeight(0), mpSrcRGB888(0), mDstWidth(0), mDstHeight(0), mpDstRGB888(0),
|
|
mSrcRow(0), mSrcCol(0), mDstRow(0), mDstCol(0), mSrcWidthFactor(0), mDstWidthFactor(0)
|
|
{
|
|
}
|
|
|
|
inline
|
|
ImageInfo::ImageInfo(const ImageInfo &someImageInfo)
|
|
{
|
|
*this==someImageInfo;
|
|
}
|
|
|
|
inline
|
|
ImageInfo::~ImageInfo()
|
|
{
|
|
}
|
|
|
|
inline
|
|
ImageInfo &ImageInfo::operator=(const ImageInfo &someImageInfo)
|
|
{
|
|
srcWidth(someImageInfo.srcWidth());
|
|
srcHeight(someImageInfo.srcHeight());
|
|
srcRGB888(((ImageInfo&)someImageInfo).srcRGB888());
|
|
dstWidth(someImageInfo.dstWidth());
|
|
dstHeight(someImageInfo.dstHeight());
|
|
dstRGB888(((ImageInfo&)someImageInfo).dstRGB888());
|
|
srcRow(someImageInfo.srcRow());
|
|
srcCol(someImageInfo.srcCol());
|
|
dstRow(someImageInfo.dstRow());
|
|
dstCol(someImageInfo.dstCol());
|
|
srcWidthFactor(someImageInfo.srcWidthFactor());
|
|
dstWidthFactor(someImageInfo.dstWidthFactor());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
bool ImageInfo::operator==(const ImageInfo &someImageInfo)const
|
|
{
|
|
return (srcWidth()==someImageInfo.srcWidth()&&
|
|
srcHeight()==someImageInfo.srcHeight()&&
|
|
((ImageInfo&)*this).srcRGB888()==((ImageInfo&)someImageInfo).srcRGB888()&&
|
|
dstWidth()==someImageInfo.dstWidth()&&
|
|
dstHeight()==someImageInfo.dstHeight()&&
|
|
((ImageInfo&)*this).dstRGB888()==((ImageInfo&)someImageInfo).dstRGB888()&&
|
|
srcRow()==someImageInfo.srcRow()&&
|
|
srcCol()==someImageInfo.srcCol()&&
|
|
dstRow()==someImageInfo.dstRow()&&
|
|
dstCol()==someImageInfo.dstCol()&&
|
|
srcWidthFactor()==someImageInfo.srcWidthFactor()&&
|
|
dstWidthFactor()==someImageInfo.dstWidthFactor());
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::setSrcParams(DWORD width,DWORD height,RGB888 *srcRGB888)
|
|
{
|
|
mSrcWidth=width;
|
|
mSrcHeight=height;
|
|
mpSrcRGB888=srcRGB888;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::setDstParams(DWORD width,DWORD height,RGB888 *dstRGB888)
|
|
{
|
|
mDstWidth=width;
|
|
mDstHeight=height;
|
|
mpDstRGB888=dstRGB888;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::srcWidth(void)const
|
|
{
|
|
return mSrcWidth;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::srcWidth(DWORD srcWidth)
|
|
{
|
|
mSrcWidth=srcWidth;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::srcHeight(void)const
|
|
{
|
|
return mSrcHeight;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::srcHeight(DWORD srcHeight)
|
|
{
|
|
mSrcHeight=srcHeight;
|
|
}
|
|
|
|
inline
|
|
RGB888 *ImageInfo::srcRGB888(void)
|
|
{
|
|
return mpSrcRGB888;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::srcRGB888(RGB888 *srcRGB888)
|
|
{
|
|
mpSrcRGB888=srcRGB888;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::dstWidth(void)const
|
|
{
|
|
return mDstWidth;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::dstWidth(DWORD dstWidth)
|
|
{
|
|
mDstWidth=dstWidth;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::dstHeight(void)const
|
|
{
|
|
return mDstHeight;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::dstHeight(DWORD dstHeight)
|
|
{
|
|
mDstHeight=dstHeight;
|
|
}
|
|
|
|
inline
|
|
RGB888 *ImageInfo::dstRGB888(void)
|
|
{
|
|
return mpDstRGB888;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::dstRGB888(RGB888 *dstRGB888)
|
|
{
|
|
mpDstRGB888=dstRGB888;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::srcRow(void)const
|
|
{
|
|
return mSrcRow;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::srcRow(DWORD srcRow)
|
|
{
|
|
mSrcRow=srcRow;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::srcCol(void)const
|
|
{
|
|
return mSrcCol;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::srcCol(DWORD srcCol)
|
|
{
|
|
mSrcCol=srcCol;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::dstRow(void)const
|
|
{
|
|
return mDstRow;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::dstRow(DWORD dstRow)
|
|
{
|
|
mDstRow=dstRow;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::dstCol(void)const
|
|
{
|
|
return mDstCol;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::dstCol(DWORD dstCol)
|
|
{
|
|
mDstCol=dstCol;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::srcWidthFactor(void)const
|
|
{
|
|
return mSrcWidthFactor;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::srcWidthFactor(DWORD srcWidthFactor)
|
|
{
|
|
mSrcWidthFactor=srcWidthFactor;
|
|
}
|
|
|
|
inline
|
|
DWORD ImageInfo::dstWidthFactor(void)const
|
|
{
|
|
return mDstWidthFactor;
|
|
}
|
|
|
|
inline
|
|
void ImageInfo::dstWidthFactor(DWORD dstWidthFactor)
|
|
{
|
|
mDstWidthFactor=dstWidthFactor;
|
|
}
|
|
#endif |