This commit is contained in:
Kulikova Svetlana
2021-03-25 16:32:57 +03:00
parent cd943c43fd
commit 40595468e7
5 changed files with 14 additions and 13 deletions

View File

@ -39,4 +39,4 @@ HEADERS += \
$$PWD/../hunspell/phonet.hxx \
$$PWD/../hunspell/replist.hxx \
$$PWD/../hunspell/suggestmgr.hxx \
$$PWD/../hunspell/w_char.hxx
$$PWD/../hunspell/w_char.hxx

View File

@ -20,8 +20,9 @@ int main()
int nCountInt = 4 * Raster_GetHeight(img) * Raster_GetWidth(img);
for (int i = 0; i < (nCountInt > 100 ? 100 : nCountInt); i++)
std::cout << pResInt[i] << " ";
std::cout << (int)pResInt[i] << " ";
img->SaveFile(NSFile::GetProcessDirectory() + L"/res.jpg", 3);
Raster_Destroy(img);
return 0;
}

View File

@ -14,4 +14,4 @@ CORE_ROOT_DIR = $$PWD/../../../../../..
PWD_ROOT_DIR = $$PWD
include($$CORE_ROOT_DIR/Common/base.pri)
ADD_DEPENDENCY(kernel, Raster)
ADD_DEPENDENCY(kernel, Raster, graphics)

View File

@ -41,13 +41,13 @@
class GRAPHICS_DECL CBgraFrame
{
private:
int m_nFileType;
int m_nFileType;
int m_lWidth;
int m_lHeight;
int m_lStride;
int m_lWidth;
int m_lHeight;
int m_lStride;
BYTE* m_pData;
BYTE* m_pData;
BYTE* m_pPalette;
int m_lPaletteColors;
@ -87,14 +87,14 @@ public:
void SetJpegQuality(const double& value);
bool OpenFile(const std::wstring& strFileName, unsigned int nFileType = 0); //0 - detect
bool OpenFile(const std::wstring& strFileName, unsigned int nFileType = 0); //0 - detect
bool SaveFile(const std::wstring& strFileName, unsigned int nFileType);
bool Decode(BYTE* pBuffer, int nSize, unsigned int nFileType = 0);
bool Encode(BYTE*& pBuffer, int& nSize, unsigned int nFileType);
bool Resize(const long& nNewWidth, const long& nNewHeight, bool bDestroyData = true);
bool Resize(const long& nNewWidth, const long& nNewHeight, bool bDestroyData = true);
bool ReColorPatternImage(const std::wstring& strFileName, unsigned int rgbColorBack, unsigned int rgbColorFore);
bool ReColorPatternImage(const std::wstring& strFileName, unsigned int rgbColorBack, unsigned int rgbColorFore);
void FromImage(IGrObject* pGraphics, bool bIsCopy = true);
};

View File

@ -82,7 +82,7 @@ public:
bool isRawFile(std::wstring& fileName);
bool isSvgFile(std::wstring& fileName);
bool isImageFile(BYTE* pBuffer,DWORD dwBytes);
bool isImageFile(BYTE* pBuffer,DWORD dwBytes);
bool isBmpFile(BYTE* pBuffer,DWORD dwBytes);
bool isGifFile(BYTE* pBuffer,DWORD dwBytes);
bool isPngFile(BYTE* pBuffer,DWORD dwBytes);
@ -108,7 +108,7 @@ public:
bool isIpodFile(BYTE* pBuffer,DWORD dwBytes);
bool isPgxFile(BYTE* pBuffer,DWORD dwBytes);
bool isSvgFile(BYTE* pBuffer,DWORD dwBytes);
bool isRawFile(BYTE* pBuffer,DWORD dwBytes);
bool isRawFile(BYTE* pBuffer,DWORD dwBytes);
std::wstring DetectFormatByData(BYTE *Data, int DataSize);