A simple wrapper of IL image.
More...
A simple wrapper of IL image.
Definition at line 32 of file gdi_bitmap.cpp.
◆ Impl() [1/2]
Beatmup::GDIBitmap::Impl::Impl |
( |
Context & |
ctx, |
|
|
const wchar_t * |
filename |
|
) |
| |
|
inline |
◆ Impl() [2/2]
Beatmup::GDIBitmap::Impl::Impl |
( |
Context & |
ctx, |
|
|
int |
width, |
|
|
int |
height, |
|
|
PixelFormat |
format |
|
) |
| |
|
inline |
Definition at line 90 of file gdi_bitmap.cpp.
95 pf = PixelFormat24bppRGB;
99 pf = PixelFormat32bppARGB;
@ QuadByte
4 channels of 8 bits per pixel (like RGBA), unsigned integer values
@ TripleByte
3 channels of 8 bits per pixel (like RGB), unsigned integer values
JNIEnv jobject jint format
◆ init()
static void Beatmup::GDIBitmap::Impl::init |
( |
| ) |
|
|
inlinestatic |
Definition at line 39 of file gdi_bitmap.cpp.
40 static bool gdiStartedUp =
false;
43 Gdiplus::GdiplusStartupInput gdiplusStartupInput;
44 ULONG_PTR gdiplusToken;
45 Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
◆ GetEncoderClsid()
static int Beatmup::GDIBitmap::Impl::GetEncoderClsid |
( |
const WCHAR * |
format, |
|
|
CLSID * |
pClsid |
|
) |
| |
|
inlinestatic |
Definition at line 50 of file gdi_bitmap.cpp.
54 Gdiplus::ImageCodecInfo* pImageCodecInfo = NULL;
56 Gdiplus::GetImageEncodersSize(&num, &
size);
60 pImageCodecInfo = (Gdiplus::ImageCodecInfo*)(malloc(
size));
61 if (pImageCodecInfo == NULL)
64 Gdiplus::GetImageEncoders(num,
size, pImageCodecInfo);
66 for (UINT j = 0; j < num; ++j)
68 if (wcscmp(pImageCodecInfo[j].MimeType,
format) == 0)
70 *pClsid = pImageCodecInfo[j].Clsid;
71 free(pImageCodecInfo);
76 free(pImageCodecInfo);
◆ getPixelFormat()
const PixelFormat Beatmup::GDIBitmap::Impl::getPixelFormat |
( |
| ) |
const |
|
inline |
Definition at line 112 of file gdi_bitmap.cpp.
113 switch (
bitmap->GetPixelFormat()) {
114 case PixelFormat8bppIndexed:
return SingleByte;
116 case PixelFormat32bppARGB:
return QuadByte;
@ SingleByte
single channel of 8 bits per pixel (like grayscale), unsigned integer values
◆ getWidth()
const int Beatmup::GDIBitmap::Impl::getWidth |
( |
| ) |
const |
|
inline |
◆ getHeight()
const int Beatmup::GDIBitmap::Impl::getHeight |
( |
| ) |
const |
|
inline |
◆ getStride()
int Beatmup::GDIBitmap::Impl::getStride |
( |
| ) |
const |
|
inline |
Definition at line 132 of file gdi_bitmap.cpp.
const int getWidth() const
#define ceili(x, y)
integer division x/y with ceiling
◆ lockPixelData()
void Beatmup::GDIBitmap::Impl::lockPixelData |
( |
| ) |
|
|
inline |
◆ unlockPixelData()
void Beatmup::GDIBitmap::Impl::unlockPixelData |
( |
| ) |
|
|
inline |
◆ getData()
const pixbyte* Beatmup::GDIBitmap::Impl::getData |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
inline |
◆ save()
void Beatmup::GDIBitmap::Impl::save |
( |
const WCHAR * |
filename | ) |
|
|
inline |
Definition at line 152 of file gdi_bitmap.cpp.
158 else if (wcsstr(
filename, L
".png")) {
static int GetEncoderClsid(const WCHAR *format, CLSID *pClsid)
◆ bitmap
Gdiplus::Bitmap* Beatmup::GDIBitmap::Impl::bitmap |
◆ size
Gdiplus::Rect Beatmup::GDIBitmap::Impl::size |
◆ data
Gdiplus::BitmapData Beatmup::GDIBitmap::Impl::data |
The documentation for this class was generated from the following file: