c3f641cb5e
Just as wxBITMAP() provides a portable way of loading bitmaps from either Windows BMP resources or embedded XPM data depending on the platform, wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources under Windows and embedded PNG data elsewhere. Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some people may prefer to always use it under all platforms. Finally modify the image sample to demonstrate loading PNG images from both resources and memory. This involved creation of a new Windows .rc file for it and copying its data files to Resources bundle directory under OS X. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
73 lines
3.2 KiB
C
73 lines
3.2 KiB
C
/*
|
|
This file was created using the following command:
|
|
|
|
./misc/scripts/png2c.py samples/image/cursor.png > samples/image/cursor_png.c
|
|
|
|
(and then edited to add this comment).
|
|
*/
|
|
|
|
/* cursor.png - 489 bytes */
|
|
static const unsigned char cursor_png[] = {
|
|
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a,
|
|
0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
|
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20,
|
|
0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a,
|
|
0xf4, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49,
|
|
0x54, 0x08, 0x08, 0x08, 0x08, 0x7c, 0x08, 0x64,
|
|
0x88, 0x00, 0x00, 0x01, 0xa0, 0x49, 0x44, 0x41,
|
|
0x54, 0x58, 0x85, 0xc5, 0x97, 0x5b, 0xb2, 0x84,
|
|
0x20, 0x0c, 0x44, 0x1b, 0xeb, 0xee, 0x48, 0xd6,
|
|
0x24, 0x6b, 0xc2, 0x35, 0xc1, 0x9a, 0x72, 0x3f,
|
|
0x24, 0x4c, 0x80, 0x80, 0x8f, 0x51, 0x27, 0x55,
|
|
0xd6, 0x94, 0x32, 0xda, 0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