-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecoder.h
More file actions
63 lines (54 loc) · 1.03 KB
/
Decoder.h
File metadata and controls
63 lines (54 loc) · 1.03 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#define _WIC
#ifdef _WIC
#include <wincodec.h>
#pragma comment(lib, "windowscodecs.lib")
#else
#include <GdiPlus.h>
using namespace Gdiplus;
using namespace DllExports;
#pragma comment(lib, "gdiplus.lib")
#endif
typedef struct {
int x;
int y;
int cx;
int cy;
int xx;
int yy;
} POS;
typedef struct {
#ifdef _WIC
IWICImagingFactory *pifty;
IWICBitmapDecoder *pidec;
IWICBitmapFrameDecode *pifrm;
IWICFormatConverter *piconv;
IWICBitmapFlipRotator *piflip;
HDC hbmpdc;
#else
ULONG_PTR token;
GpImage *pgp;
#endif
HDC hdc;
HBRUSH hbr;
GUID g;
POS gif;
POS gif2;
POS pos;
BOOL bgif;
UINT ubit;
UINT uindex;
UINT ucount;
UINT uwidth;
UINT uheight;
int r;
int w;
int h;
LPTSTR lpfmt;
LPVOID lpbit;
} BMP;
BOOL CreateCanvasDC(HDC *phdc, HBRUSH hbr, int w, int h);
void HrFailedReturn(HRESULT hr, TCHAR *pszinfo, int cchinfo);
void ReleaseBitmap(BMP *pbmp, BOOL bexit);
BOOL LoadBitmapFromFile(BMP *pbmp, TCHAR *pszfile, TCHAR *pszinfo,int cchinfo);
BOOL GetBitmap(BMP *pbmp, TCHAR *pszinfo, int cchinfo);