-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathImage.h
51 lines (38 loc) · 1.8 KB
/
Image.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "ExtractBase.h"
#include "Image/Bmp.h"
#include "Image/Png.h"
struct SOption;
class CImage : public CExtractBase
{
public:
CImage();
bool Mount(CArcFile* archive) override;
bool Decode(CArcFile* archive) override;
bool Init(CArcFile* archive, void* bmp, const YCString& file_name = _T(""));
bool Init(CArcFile* archive, s32 width, s32 height, u16 bpp, const void* pallet = nullptr, size_t pallet_size = 1024, const YCString& file_name = _T(""));
void Close();
bool Write(size_t bmp_size, bool progress = true);
bool Write(const void* bmp_data, size_t bmp_data_size, bool progress = true);
bool WriteReverse(size_t bmp_size, bool progress = true);
bool WriteReverse(const void* bmp_data, size_t bmp_data_size, bool progress = true);
bool WriteCompoBGRA(size_t bmp_size, bool progress = true);
bool WriteCompoBGRA(const void* bmp_data, size_t bmp_data_size, bool progress = true);
bool WriteCompoBGRAReverse(size_t bmp_size, bool progress = true);
bool WriteCompoBGRAReverse(const void* bmp_data, size_t bmp_data_size, bool progress = true);
bool WriteCompoRGBA(size_t bmp_size, bool progress = true);
bool WriteCompoRGBA(const void* bmp_data, size_t bmp_data_size, bool progress = true);
bool WriteCompoRGBAReverse(size_t bmp_size, bool progress = true);
bool WriteCompoRGBAReverse(const void* bmp_data, size_t bmp_data_size, bool progress = true);
LPBITMAPFILEHEADER GetBmpFileHeader() const;
LPBITMAPINFOHEADER GetBmpInfoHeader() const;
protected:
CArcFile* m_archive = nullptr;
SOption* m_option = nullptr;
u8* m_bmp_data = nullptr;
bool m_is_valid_bmp_header = true;
BITMAPFILEHEADER* m_bmp_file_header = nullptr;
BITMAPINFOHEADER* m_bmp_info_header = nullptr;
CBmp m_bmp;
CPng m_png;
};