git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61940 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
Elen.Subbotina
2015-04-07 14:49:37 +00:00
committed by Alexander Trofimov
parent 4f5be3176c
commit d993363c6d
7 changed files with 2374 additions and 0 deletions

View File

@ -0,0 +1,90 @@
#ifndef _BUILD_BGRA_FRAME_
#define _BUILD_BGRA_FRAME_
#include <string>
#include "../common/Types.h"
class CxImage;
class CBgraFrame
{
private:
int m_lWidth;
int m_lHeight;
int m_lStride;
BYTE* m_pData;
public:
CBgraFrame()
{
Clear();
}
~CBgraFrame()
{
Destroy();
}
private:
inline void Destroy()
{
if (NULL != m_pData)
delete []m_pData;
Clear();
}
inline void Clear()
{
m_lWidth = 0;
m_lHeight = 0;
m_lStride = 0;
m_pData = NULL;
}
public:
inline void ClearNoAttack()
{
Clear();
}
inline int get_Width()
{
return m_lWidth;
}
inline int get_Height()
{
return m_lHeight;
}
inline void put_Width(const int& lWidth)
{
m_lWidth = lWidth;
}
inline void put_Height(const int& lHeight)
{
m_lHeight = lHeight;
}
inline int get_Stride()
{
return m_lStride;
}
inline void put_Stride(const int& lStride)
{
m_lStride = lStride;
}
inline BYTE* get_Data()
{
return m_pData;
}
inline void put_Data(BYTE* pData)
{
m_pData = pData;
}
public:
bool OpenFile(const std::wstring& strFileName, unsigned int nFileType = 0); //0 - detect
bool SaveFile(const std::wstring& strFileName, unsigned int nFileType);
bool Resize(const long& nNewWidth, const long& nNewHeight);
private:
void CxImageToMediaFrame( CxImage& img );
};
#endif