support gif

This commit is contained in:
xianjimli 2018-11-25 18:57:44 +08:00
parent 8332cd8ee6
commit a1e2ac2ca9
33 changed files with 6165 additions and 121 deletions

View File

@ -71,6 +71,10 @@
* Windows/Linux支持高清屏幕。 * Windows/Linux支持高清屏幕。
* 电阻屏校准窗口。 * 电阻屏校准窗口。
* 数字时钟控件。 * 数字时钟控件。
* 支持SVG
* 支持GIF
* ProgressCircle
* 支持clipboard
## 短期计划(顺序不定) ## 短期计划(顺序不定)
* menu * menu

View File

@ -56,6 +56,7 @@
#include "assets/inc/ui/scroll_view_h.data" #include "assets/inc/ui/scroll_view_h.data"
#include "assets/inc/ui/scroll_bar_h.data" #include "assets/inc/ui/scroll_bar_h.data"
#include "assets/inc/ui/spinbox.data" #include "assets/inc/ui/spinbox.data"
#include "assets/inc/ui/gif_image.data"
#include "assets/inc/ui/text_selector.data" #include "assets/inc/ui/text_selector.data"
#include "assets/inc/ui/big_font.data" #include "assets/inc/ui/big_font.data"
#include "assets/inc/ui/tab_top_compact.data" #include "assets/inc/ui/tab_top_compact.data"
@ -97,6 +98,7 @@
#include "assets/inc/images/anic.res" #include "assets/inc/images/anic.res"
#include "assets/inc/images/earth.res" #include "assets/inc/images/earth.res"
#include "assets/inc/images/ani5.res" #include "assets/inc/images/ani5.res"
#include "assets/inc/images/bee.res"
#include "assets/inc/images/contact.res" #include "assets/inc/images/contact.res"
#include "assets/inc/images/slider_fg.res" #include "assets/inc/images/slider_fg.res"
#include "assets/inc/images/contact_active.res" #include "assets/inc/images/contact_active.res"
@ -208,6 +210,7 @@
#include "assets/inc/images/question.data" #include "assets/inc/images/question.data"
#include "assets/inc/images/guage_bg.data" #include "assets/inc/images/guage_bg.data"
#include "assets/inc/images/arrow_right_n.data" #include "assets/inc/images/arrow_right_n.data"
#include "assets/inc/images/bee.data"
#include "assets/inc/images/clock_bg.data" #include "assets/inc/images/clock_bg.data"
#include "assets/inc/images/me_active.data" #include "assets/inc/images/me_active.data"
#include "assets/inc/images/cursor.data" #include "assets/inc/images/cursor.data"
@ -282,7 +285,7 @@
#include "assets/inc/images/3.data" #include "assets/inc/images/3.data"
#include "assets/inc/images/arrow_left_n.data" #include "assets/inc/images/arrow_left_n.data"
#include "assets/inc/images/edit_clear_p.data" #include "assets/inc/images/edit_clear_p.data"
#endif /*WITH_STB_IMAGE*/ #endif/*WITH_STB_IMAGE*/
#ifdef WITH_VGCANVAS #ifdef WITH_VGCANVAS
#include "assets/inc/images/pointer_4.bsvg" #include "assets/inc/images/pointer_4.bsvg"
#include "assets/inc/images/china.bsvg" #include "assets/inc/images/china.bsvg"
@ -296,17 +299,17 @@
#include "assets/inc/images/pointer.bsvg" #include "assets/inc/images/pointer.bsvg"
#include "assets/inc/images/pointer_red.bsvg" #include "assets/inc/images/pointer_red.bsvg"
#include "assets/inc/images/girl.bsvg" #include "assets/inc/images/girl.bsvg"
#endif /*WITH_VGCANVAS*/ #endif/*WITH_VGCANVAS*/
#ifdef WITH_STB_FONT #ifdef WITH_STB_FONT
#ifdef WITH_MINI_FONT #ifdef WITH_MINI_FONT
#include "assets/inc/fonts/default.mini.res" #include "assets/inc/fonts/default.mini.res"
#else /*WITH_MINI_FONT*/ #else/*WITH_MINI_FONT*/
#include "assets/inc/fonts/default.res" #include "assets/inc/fonts/default.res"
#endif /*WITH_MINI_FONT*/ #endif/*WITH_MINI_FONT*/
#else /*WITH_STB_FONT*/ #else/*WITH_STB_FONT*/
#include "assets/inc/fonts/default.data" #include "assets/inc/fonts/default.data"
#endif /*WITH_STB_FONT*/ #endif/*WITH_STB_FONT*/
#endif /*WITH_FS_RES*/ #endif/*WITH_FS_RES*/
ret_t assets_init(void) { ret_t assets_init(void) {
assets_manager_t* rm = assets_manager(); assets_manager_t* rm = assets_manager();
@ -354,6 +357,7 @@ ret_t assets_init(void) {
assets_manager_add(rm, ui_scroll_view_h); assets_manager_add(rm, ui_scroll_view_h);
assets_manager_add(rm, ui_scroll_bar_h); assets_manager_add(rm, ui_scroll_bar_h);
assets_manager_add(rm, ui_spinbox); assets_manager_add(rm, ui_spinbox);
assets_manager_add(rm, ui_gif_image);
assets_manager_add(rm, ui_text_selector); assets_manager_add(rm, ui_text_selector);
assets_manager_add(rm, ui_big_font); assets_manager_add(rm, ui_big_font);
assets_manager_add(rm, ui_tab_top_compact); assets_manager_add(rm, ui_tab_top_compact);
@ -410,6 +414,7 @@ ret_t assets_init(void) {
assets_manager_add(rm, image_question); assets_manager_add(rm, image_question);
assets_manager_add(rm, image_guage_bg); assets_manager_add(rm, image_guage_bg);
assets_manager_add(rm, image_arrow_right_n); assets_manager_add(rm, image_arrow_right_n);
assets_manager_add(rm, image_bee);
assets_manager_add(rm, image_clock_bg); assets_manager_add(rm, image_clock_bg);
assets_manager_add(rm, image_me_active); assets_manager_add(rm, image_me_active);
assets_manager_add(rm, image_cursor); assets_manager_add(rm, image_cursor);
@ -512,7 +517,7 @@ ret_t assets_init(void) {
assets_manager_add(rm, image_pointer); assets_manager_add(rm, image_pointer);
assets_manager_add(rm, image_pointer_red); assets_manager_add(rm, image_pointer_red);
assets_manager_add(rm, image_girl); assets_manager_add(rm, image_girl);
#endif /*WITH_VGCANVAS*/ #endif/*WITH_VGCANVAS*/
#endif #endif
tk_init_assets(); tk_init_assets();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
const unsigned char ui_gif_image[] = {
0x04,0x00,0x01,0x01,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0x69,0x66,0x5f,0x69,0x6d,0x61,0x67,
0x65,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,
0x6c,0x61,0x74,0x65,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,0x00,0x00,
0x00,0x00,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x63,0x3a,0x32,0x20,0x72,0x3a,0x32,0x00,0x00,0x67,0x69,
0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,
0x62,0x65,0x65,0x00,0x00,0x00,0x67,0x69,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x62,0x65,0x65,0x00,0x00,0x00,0x67,0x69,0x66,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x62,0x65,0x65,0x00,
0x00,0x00,0x67,0x69,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,
0x61,0x67,0x65,0x00,0x62,0x65,0x65,0x00,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x02,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x28,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,
0x78,0x74,0x00,0x43,0x6c,0x6f,0x73,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*556*/

View File

@ -1,5 +1,5 @@
const unsigned char ui_main[] = { const unsigned char ui_main[] = {
0x04,0x00,0x01,0x01,0x71,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x64,0x61,0x74, 0x04,0x00,0x01,0x01,0xce,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x64,0x61,0x74,
0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@ -118,21 +118,25 @@ const unsigned char ui_main[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x76,0x67, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x76,0x67,
0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x56,0x47,0x20,0x49,0x6d,0x61,0x67, 0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x56,0x47,0x20,0x49,0x6d,0x61,0x67,
0x65,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x65,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x63,0x32,0x20,0x72,0x38,0x20,0x6d,0x35,0x20,0x73,0x35,0x00,
0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,
0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6d,0x74,0x65,0x73,0x74,0x00,0x74,0x65,0x78,0x74,0x00,
0x4d,0x65,0x6d,0x54,0x65,0x73,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x68,0x6f,0x77,0x5f,0x66,0x70,0x73,0x00, 0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x67,0x69,0x66,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,
0x74,0x65,0x78,0x74,0x00,0x53,0x68,0x6f,0x77,0x20,0x46,0x50,0x53,0x00,0x00,0x00,0x62,0x75,0x74,0x74, 0x74,0x65,0x78,0x74,0x00,0x47,0x49,0x46,0x20,0x49,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x76,0x69,
0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x61,0x79,0x6f,0x75,0x74,
0x00,0x63,0x32,0x20,0x72,0x38,0x20,0x6d,0x35,0x20,0x73,0x35,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x65,0x78,0x69, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x45,0x78,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,
0x00,};/*2721*/ 0x6d,0x65,0x6d,0x74,0x65,0x73,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4d,0x65,0x6d,0x54,0x65,0x73,0x74,
0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,
0x61,0x6d,0x65,0x00,0x73,0x68,0x6f,0x77,0x5f,0x66,0x70,0x73,0x00,0x74,0x65,0x78,0x74,0x00,0x53,0x68,
0x6f,0x77,0x20,0x46,0x50,0x53,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x65,0x78,0x69,0x74,0x00,0x74,0x65,0x78,0x74,0x00,
0x45,0x78,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*2814*/

View File

@ -1,69 +1,70 @@
const unsigned char ui_svg_image[] = { const unsigned char ui_svg_image[] = {
0x04,0x00,0x01,0x01,0x15,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67, 0x04,0x00,0x01,0x01,0x2a,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67,
0x65,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x65,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x63,0x34,0x20,0x72,0x34,0x00,0x00,0x73,0x76, 0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,
0x67,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x6c,0x61,0x74,0x65,0x00,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x63,0x34,0x20,0x72,0x34,0x00,0x00,0x73,
0x76,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,
0x63,0x68,0x69,0x6e,0x61,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00, 0x00,0x63,0x68,0x69,0x6e,0x61,0x00,0x00,0x00,0x73,0x76,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x5f,0x31,0x00, 0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x5f,0x31,
0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x73,0x76,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,
0x61,0x67,0x65,0x00,0x67,0x69,0x72,0x6c,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67,0x65, 0x6d,0x61,0x67,0x65,0x00,0x67,0x69,0x72,0x6c,0x00,0x00,0x00,0x73,0x76,0x67,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,
0x5f,0x34,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00, 0x72,0x5f,0x34,0x00,0x00,0x00,0x73,0x76,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x63,0x68,0x69,0x6e,0x61,0x00,0x61,0x6e,0x69,0x6d,0x61,0x74,0x69, 0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x63,0x68,0x69,0x6e,0x61,0x00,0x61,0x6e,0x69,0x6d,0x61,0x74,
0x6f,0x6e,0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x28,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20, 0x69,0x6f,0x6e,0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x28,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,
0x74,0x6f,0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d, 0x20,0x74,0x6f,0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,
0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29, 0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,
0x3b,0x73,0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x78,0x5f,0x74, 0x29,0x3b,0x73,0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x78,0x5f,
0x6f,0x3d,0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x79,0x5f,0x74,0x6f,0x3d, 0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x79,0x5f,0x74,0x6f,
0x32,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20, 0x3d,0x32,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,
0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x00,0x00,0x00,0x73,0x76, 0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x00,0x00,0x00,0x73,
0x67,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x76,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,
0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x5f,0x31,0x00,0x61,0x6e,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x00, 0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x5f,0x31,0x00,0x61,0x6e,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,
0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x28,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x74,0x6f,0x3d, 0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x28,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x74,0x6f,
0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30, 0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,
0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x73,0x63, 0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x73,
0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x78,0x5f,0x74,0x6f,0x3d,0x32, 0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x78,0x5f,0x74,0x6f,0x3d,
0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x79,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20, 0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x79,0x5f,0x74,0x6f,0x3d,0x32,0x2c,
0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72, 0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,
0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69, 0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x00,0x00,0x00,0x73,0x76,0x67,0x00,
0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x67,0x69,0x72,
0x6c,0x00,0x61,0x6e,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,
0x28,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x74,0x6f,0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,
0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,
0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x73,0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,
0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x78,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,
0x3d,0x30,0x2c,0x20,0x79,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,
0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,
0x30,0x30,0x29,0x3b,0x00,0x00,0x00,0x73,0x76,0x67,0x5f,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x5f,0x34,0x00,0x61, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x67,0x69,
0x6e,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x28,0x66,0x72, 0x72,0x6c,0x00,0x61,0x6e,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,
0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x74,0x6f,0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f, 0x6e,0x28,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x74,0x6f,0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,
0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e, 0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,
0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x73,0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,0x6f,0x6d,0x3d, 0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x73,0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,
0x30,0x2c,0x20,0x78,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,0x2c, 0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x78,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,
0x20,0x79,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d, 0x6d,0x3d,0x30,0x2c,0x20,0x79,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,
0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,0x29, 0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,
0x3b,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x30,0x30,0x30,0x29,0x3b,0x00,0x00,0x00,0x73,0x76,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,0x6f,0x73, 0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x5f,0x34,0x00,
0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1349*/ 0x61,0x6e,0x69,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x00,0x72,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x28,0x66,
0x72,0x6f,0x6d,0x3d,0x30,0x2c,0x20,0x74,0x6f,0x3d,0x36,0x2e,0x32,0x38,0x2c,0x20,0x79,0x6f,0x79,0x6f,
0x5f,0x74,0x69,0x6d,0x65,0x73,0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,
0x6e,0x3d,0x35,0x30,0x30,0x30,0x29,0x3b,0x73,0x63,0x61,0x6c,0x65,0x28,0x78,0x5f,0x66,0x72,0x6f,0x6d,
0x3d,0x30,0x2c,0x20,0x78,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x5f,0x66,0x72,0x6f,0x6d,0x3d,0x30,
0x2c,0x20,0x79,0x5f,0x74,0x6f,0x3d,0x32,0x2c,0x20,0x79,0x6f,0x79,0x6f,0x5f,0x74,0x69,0x6d,0x65,0x73,
0x3d,0x31,0x30,0x30,0x30,0x2c,0x20,0x64,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3d,0x35,0x30,0x30,0x30,
0x29,0x3b,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,0x6f,
0x73,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1370*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

View File

@ -0,0 +1,9 @@
<window anim_hint="htranslate">
<view x="0" y="0" w="100%" h="-60" layout="c:2 r:2">
<gif image="bee"/>
<gif image="bee"/>
<gif image="bee"/>
<gif image="bee"/>
</view>
<button name="close" x="c" y="bottom:10" w="80" h="40" text="Close" />
</window>

Binary file not shown.

View File

@ -28,6 +28,7 @@
<button name="open:calibration_win" text="Calibration"/> <button name="open:calibration_win" text="Calibration"/>
<button name="open:progress_circle" text="ProgressCircle"/> <button name="open:progress_circle" text="ProgressCircle"/>
<button name="open:svg_image" text="SVG Image"/> <button name="open:svg_image" text="SVG Image"/>
<button name="open:gif_image" text="GIF Image"/>
</view> </view>
<view x="0" y="0" w="100%" h="100%" layout="c2 r8 m5 s5"> <view x="0" y="0" w="100%" h="100%" layout="c2 r8 m5 s5">
<button name="open:memtest" text="MemTest"/> <button name="open:memtest" text="MemTest"/>

Binary file not shown.

View File

@ -1,17 +1,17 @@
<window layout="c4 r4"> <window anim_hint="htranslate" layout="c4 r4">
<svg_image image="china" /> <svg image="china" />
<svg_image image="pointer_1" /> <svg image="pointer_1" />
<svg_image image="girl" /> <svg image="girl" />
<svg_image image="pointer_4" /> <svg image="pointer_4" />
<svg_image image="china" <svg image="china"
animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/> animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/>
<svg_image image="pointer_1" <svg image="pointer_1"
animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/> animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/>
<svg_image image="girl" <svg image="girl"
animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/> animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/>
<svg_image image="pointer_4" <svg image="pointer_4"
animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/> animation="rotation(from=0, to=6.28, yoyo_times=1000, duration=5000);scale(x_from=0, x_to=2, y_from=0, y_to=2, yoyo_times=1000, duration=5000);"/>
<button name="close" text="Close"/> <button name="close" text="Close"/>
</window> </window>

View File

@ -1,4 +1,7 @@
# 最新动态 # 最新动态
* 2018/11/25
* 支持GIF图片(参考demos/assets/raw/ui/gif\_image.xml)。
* 2018/11/24 * 2018/11/24
* svg支持圆弧路径(A/a) * svg支持圆弧路径(A/a)

View File

@ -118,6 +118,7 @@ def gen_res_png_jpg():
inc=joinPath(OUTPUT_DIR, 'images/'+basename); inc=joinPath(OUTPUT_DIR, 'images/'+basename);
inc=inc.replace('.png', '.data') inc=inc.replace('.png', '.data')
inc=inc.replace('.jpg', '.data') inc=inc.replace('.jpg', '.data')
inc=inc.replace('.gif', '.data')
imagegen(raw, inc) imagegen(raw, inc)
def gen_res_all_image(): def gen_res_all_image():

View File

@ -149,6 +149,16 @@ asset_info_t* assets_manager_load(assets_manager_t* rm, asset_type_t type, const
return info; return info;
} }
return_value_if_fail(
build_path(res_root, path, MAX_PATH, TRUE, "assets/raw/images", name, ".gif") == RET_OK,
NULL);
if (file_exist(path)) {
size = file_get_size(path);
info = load_asset(type, ASSET_TYPE_IMAGE_GIF, size, path, name);
/*not cache png file jpg data*/
return info;
}
return_value_if_fail(build_path(res_root, path, MAX_PATH, FALSE, "assets/raw/images/svg", return_value_if_fail(build_path(res_root, path, MAX_PATH, FALSE, "assets/raw/images/svg",
name, ".bsvg") == RET_OK, name, ".bsvg") == RET_OK,
NULL); NULL);

View File

@ -49,6 +49,11 @@ ret_t bitmap_destroy(bitmap_t* bitmap) {
} else { } else {
TKMEM_FREE(bitmap->data); TKMEM_FREE(bitmap->data);
} }
if (bitmap->gif_delays) {
TKMEM_FREE(bitmap->gif_delays);
bitmap->gif_delays = NULL;
}
} }
if (bitmap->should_free_handle) { if (bitmap->should_free_handle) {

View File

@ -168,6 +168,13 @@ struct _bitmap_t {
*/ */
const uint8_t* data; const uint8_t* data;
bool_t is_gif;
/*for gif begin*/
int32_t* gif_delays;
uint32_t gif_frame_h;
uint32_t gif_frames_nr;
/*for gif end*/
/*private members*/ /*private members*/
/*data是按cache line对齐而data_free_ptr是用于释放的指针*/ /*data是按cache line对齐而data_free_ptr是用于释放的指针*/
uint8_t* data_free_ptr; uint8_t* data_free_ptr;
@ -181,6 +188,7 @@ struct _bitmap_t {
/* 显示特定的数据如OpenGL texture IDagg/agge中图片等。*/ /* 显示特定的数据如OpenGL texture IDagg/agge中图片等。*/
void* specific; void* specific;
/*specific_destroy的上下文*/ /*specific_destroy的上下文*/
void* specific_ctx; void* specific_ctx;
/*用于销毁specific*/ /*用于销毁specific*/
bitmap_destroy_t specific_destroy; bitmap_destroy_t specific_destroy;

View File

@ -21,10 +21,9 @@
#include "base/image_loader.h" #include "base/image_loader.h"
ret_t image_loader_load(image_loader_t* loader, const uint8_t* buff, uint32_t size, ret_t image_loader_load(image_loader_t* loader, const asset_info_t* asset, bitmap_t* bitmap) {
bitmap_t* bitmap) { return_value_if_fail(loader != NULL && loader->load != NULL && asset != NULL && bitmap != NULL,
return_value_if_fail(loader != NULL && loader->load != NULL && buff != NULL && bitmap != NULL,
RET_BAD_PARAMS); RET_BAD_PARAMS);
return loader->load(loader, buff, size, bitmap); return loader->load(loader, asset, bitmap);
} }

View File

@ -23,13 +23,14 @@
#define TK_IMAGE_LOADER_H #define TK_IMAGE_LOADER_H
#include "base/bitmap.h" #include "base/bitmap.h"
#include "base/assets_manager.h"
BEGIN_C_DECLS BEGIN_C_DECLS
struct _image_loader_t; struct _image_loader_t;
typedef struct _image_loader_t image_loader_t; typedef struct _image_loader_t image_loader_t;
typedef ret_t (*image_loader_load_t)(image_loader_t* loader, const uint8_t* buff, uint32_t size, typedef ret_t (*image_loader_load_t)(image_loader_t* loader, const asset_info_t* asset,
bitmap_t* bitmap); bitmap_t* bitmap);
/** /**
@ -44,13 +45,11 @@ struct _image_loader_t {
* @method image_loader_load * @method image_loader_load
* *
* @param {image_loader_t*} loader loader对象 * @param {image_loader_t*} loader loader对象
* @param {uint8_t*} buff * @param {const asset_info_t*} asset
* @param {uint32_t} size
* @param {bitmap_t*} bitmap * @param {bitmap_t*} bitmap
* @return {ret_t} RET_OK表示成功 * @return {ret_t} RET_OK表示成功
*/ */
ret_t image_loader_load(image_loader_t* loader, const uint8_t* buff, uint32_t size, ret_t image_loader_load(image_loader_t* loader, const asset_info_t* asset, bitmap_t* bitmap);
bitmap_t* bitmap);
END_C_DECLS END_C_DECLS

View File

@ -156,7 +156,7 @@ ret_t image_manager_load(image_manager_t* imm, const char* name, bitmap_t* image
#endif #endif
return RET_OK; return RET_OK;
} else if (imm->loader != NULL && res->subtype != ASSET_TYPE_IMAGE_BSVG) { } else if (imm->loader != NULL && res->subtype != ASSET_TYPE_IMAGE_BSVG) {
ret_t ret = image_loader_load(imm->loader, res->data, res->size, image); ret_t ret = image_loader_load(imm->loader, res, image);
if (ret == RET_OK) { if (ret == RET_OK) {
image_manager_add(imm, name, image); image_manager_add(imm, name, image);
assets_manager_unref(imm->assets_manager, res); assets_manager_unref(imm->assets_manager, res);

View File

@ -23,6 +23,7 @@
#include "switch/switch.h" #include "switch/switch.h"
#include "guage/guage.h" #include "guage/guage.h"
#include "guage/guage_pointer.h" #include "guage/guage_pointer.h"
#include "gif_image/gif_image.h"
#include "svg_image/svg_image.h" #include "svg_image/svg_image.h"
#include "keyboard/keyboard.h" #include "keyboard/keyboard.h"
#include "base/widget_factory.h" #include "base/widget_factory.h"
@ -67,6 +68,7 @@ ret_t tk_ext_widgets_init() {
widget_factory_register(widget_factory(), WIDGET_TYPE_IMAGE_ANIMATION, image_animation_create); widget_factory_register(widget_factory(), WIDGET_TYPE_IMAGE_ANIMATION, image_animation_create);
widget_factory_register(widget_factory(), WIDGET_TYPE_PROGRESS_CIRCLE, progress_circle_create); widget_factory_register(widget_factory(), WIDGET_TYPE_PROGRESS_CIRCLE, progress_circle_create);
widget_factory_register(widget_factory(), WIDGET_TYPE_SVG_IMAGE, svg_image_create); widget_factory_register(widget_factory(), WIDGET_TYPE_SVG_IMAGE, svg_image_create);
widget_factory_register(widget_factory(), WIDGET_TYPE_GIF_IMAGE, gif_image_create);
return RET_OK; return RET_OK;
} }

View File

@ -0,0 +1,4 @@
# SVG
目前支持的特性请参考src/svg/README.md

View File

@ -0,0 +1,148 @@
/**
* File: gif_image.h
* Author: AWTK Develop Team
* Brief: gif_image
*
* Copyright (c) 2018 - 2018 Guangzhou ZHIYUAN Electronics Co.,Ltd.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2018-11-25 Li XianJing <xianjimli@hotmail.com> created
*
*/
#include "base/mem.h"
#include "base/utils.h"
#include "base/timer.h"
#include "base/widget_vtable.h"
#include "gif_image/gif_image.h"
static ret_t gif_image_on_timer(const timer_info_t* info) {
gif_image_t* image = GIF_IMAGE(info->ctx);
image->index++;
if (image->index >= image->frames_nr) {
image->index = 0;
}
widget_invalidate_force(WIDGET(image));
if (image->delays != NULL && image->frames_nr > 1) {
uint32_t delay = image->delays[image->index];
if (delay == info->duration_ms) {
return RET_REPEAT;
} else {
image->timer_id = timer_add(gif_image_on_timer, image, delay);
return RET_REMOVE;
}
} else {
image->timer_id = TK_INVALID_ID;
return RET_REMOVE;
}
}
static ret_t gif_image_on_paint_self(widget_t* widget, canvas_t* c) {
wh_t y = 0;
wh_t h = 0;
bitmap_t bitmap;
gif_image_t* image = GIF_IMAGE(widget);
vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd);
image_base_t* image_base = IMAGE_BASE(widget);
return_value_if_fail(widget != NULL && c != NULL, RET_BAD_PARAMS);
if (image_base->image == NULL) {
return RET_OK;
}
return_value_if_fail(widget_load_image(widget, image_base->image, &bitmap) == RET_OK,
RET_BAD_PARAMS);
return_value_if_fail(bitmap.is_gif, RET_OK);
image->delays = bitmap.gif_delays;
image->frames_nr = bitmap.gif_frames_nr;
if (image->index >= image->frames_nr) {
image->index = 0;
}
h = bitmap.gif_frame_h;
y = bitmap.gif_frame_h * image->index;
if (vg != NULL) {
if (image_need_transform(widget)) {
vgcanvas_save(vg);
image_transform(widget, c);
vgcanvas_draw_icon(vg, &bitmap, 0, y, bitmap.w, h, 0, 0, widget->w, widget->h);
vgcanvas_restore(vg);
return RET_OK;
}
}
if (bitmap.data != NULL) {
xy_t dx = (widget->w - bitmap.w) >> 1;
xy_t dy = (widget->h - h) >> 1;
rect_t src = rect_init(0, y, bitmap.w, h);
rect_t dst = rect_init(dx, dy, bitmap.w, h);
canvas_draw_image(c, &bitmap, &src, &dst);
}
if (image->timer_id == TK_INVALID_ID && image->frames_nr > 1) {
uint32_t delay = image->delays[image->index];
image->timer_id = timer_add(gif_image_on_timer, image, delay);
}
return RET_OK;
}
static const char* s_gif_image_clone_properties[] = {
WIDGET_PROP_IMAGE, WIDGET_PROP_SCALE_X, WIDGET_PROP_SCALE_Y,
WIDGET_PROP_ANCHOR_X, WIDGET_PROP_ANCHOR_Y, WIDGET_PROP_ROTATION,
WIDGET_PROP_CLICKABLE, WIDGET_PROP_SELECTABLE, NULL};
static ret_t gif_image_destroy(widget_t* widget) {
gif_image_t* image = GIF_IMAGE(widget);
return_value_if_fail(image != NULL, RET_BAD_PARAMS);
if (image->timer_id != TK_INVALID_ID) {
timer_remove(image->timer_id);
image->timer_id = TK_INVALID_ID;
}
return image_base_destroy(widget);
}
static const widget_vtable_t s_gif_image_vtable = {.size = sizeof(gif_image_t),
.type = WIDGET_TYPE_GIF_IMAGE,
.clone_properties = s_gif_image_clone_properties,
.create = gif_image_create,
.destroy = gif_image_destroy,
.on_event = image_base_on_event,
.on_paint_self = gif_image_on_paint_self,
.on_paint_background = widget_on_paint_null,
.set_prop = image_base_set_prop,
.get_prop = image_base_get_prop};
widget_t* gif_image_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) {
gif_image_t* gif_image = TKMEM_ZALLOC(gif_image_t);
widget_t* widget = WIDGET(gif_image);
return_value_if_fail(gif_image != NULL, NULL);
widget_init(widget, parent, &s_gif_image_vtable, x, y, w, h);
image_base_init(widget);
return widget;
}
widget_t* gif_image_cast(widget_t* widget) {
return_value_if_fail(widget != NULL && widget->vt == &s_gif_image_vtable, NULL);
return widget;
}

View File

@ -0,0 +1,76 @@
/**
* File: gif_image.h
* Author: AWTK Develop Team
* Brief: gif_image
*
* Copyright (c) 2018 - 2018 Guangzhou ZHIYUAN Electronics Co.,Ltd.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2018-11-25 Li XianJing <xianjimli@hotmail.com> created
*
*/
#ifndef TK_GIF_IMAGE_H
#define TK_GIF_IMAGE_H
#include "base/widget.h"
#include "base/image_base.h"
BEGIN_C_DECLS
/**
* @class gif_image_t
* @parent widget_t
* @annotation ["scriptable"]
* GIF图片控件
*/
typedef struct _gif_image_t {
image_base_t image_base;
/*private*/
int* delays;
uint32_t index;
uint32_t timer_id;
uint32_t frames_nr;
} gif_image_t;
/**
* @method gif_image_create
* gif_image对象
* @annotation ["constructor", "scriptable"]
* @param {widget_t*} parent
* @param {xy_t} x x坐标
* @param {xy_t} y y坐标
* @param {wh_t} w
* @param {wh_t} h
*
* @return {widget_t*}
*/
widget_t* gif_image_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h);
/**
* @method gif_image_cast
* gif_image对象(使)
* @annotation ["cast", "scriptable"]
* @param {widget_t*} widget gif_image对象
*
* @return {widget_t*} gif_image对象
*/
widget_t* gif_image_cast(widget_t* widget);
#define WIDGET_TYPE_GIF_IMAGE "gif"
#define GIF_IMAGE(widget) ((gif_image_t*)(widget))
END_C_DECLS
#endif /*TK_GIF_IMAGE_H*/

View File

@ -15,7 +15,7 @@
/** /**
* History: * History:
* ================================================================ * ================================================================
* 2018-01-28 Li XianJing <xianjimli@hotmail.com> created * 2018-11-22 Li XianJing <xianjimli@hotmail.com> created
* *
*/ */

View File

@ -64,7 +64,7 @@ widget_t* svg_image_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h);
*/ */
widget_t* svg_image_cast(widget_t* widget); widget_t* svg_image_cast(widget_t* widget);
#define WIDGET_TYPE_SVG_IMAGE "svg_image" #define WIDGET_TYPE_SVG_IMAGE "svg"
#define SVG_IMAGE(widget) ((svg_image_t*)(widget)) #define SVG_IMAGE(widget) ((svg_image_t*)(widget))

54
src/image_loader/image_loader_stb.c Executable file → Normal file
View File

@ -29,33 +29,56 @@
#include "stb/stb_image.h" #include "stb/stb_image.h"
#include "image_loader/image_loader_stb.h" #include "image_loader/image_loader_stb.h"
ret_t stb_load_image(const uint8_t* buff, uint32_t buff_size, bitmap_t* image, bool_t require_bgra, ret_t stb_load_image(int32_t subtype, const uint8_t* buff, uint32_t buff_size, bitmap_t* image,
bool_t enable_bgr565) { bool_t require_bgra, bool_t enable_bgr565) {
int w = 0; int w = 0;
int h = 0; int h = 0;
int n = 0; int n = 0;
ret_t ret = RET_FAIL; ret_t ret = RET_FAIL;
uint8_t* data = stbi_load_from_memory(buff, buff_size, &w, &h, &n, 0);
return_value_if_fail(data != NULL, RET_FAIL);
if (enable_bgr565 && rgba_data_is_opaque(data, w, h, n)) { if (subtype != ASSET_TYPE_IMAGE_GIF) {
ret = bitmap_init_from_rgba(image, w, h, BITMAP_FMT_BGR565, data, n); uint8_t* data = stbi_load_from_memory(buff, buff_size, &w, &h, &n, 0);
} else if (require_bgra) { return_value_if_fail(data != NULL, RET_FAIL);
ret = bitmap_init_from_rgba(image, w, h, BITMAP_FMT_BGRA8888, data, n);
if (enable_bgr565 && rgba_data_is_opaque(data, w, h, n)) {
ret = bitmap_init_from_rgba(image, w, h, BITMAP_FMT_BGR565, data, n);
} else if (require_bgra) {
ret = bitmap_init_from_rgba(image, w, h, BITMAP_FMT_BGRA8888, data, n);
} else {
ret = bitmap_init_from_rgba(image, w, h, BITMAP_FMT_RGBA8888, data, n);
}
stbi_image_free((uint8_t*)(data));
} else { } else {
ret = bitmap_init_from_rgba(image, w, h, BITMAP_FMT_RGBA8888, data, n); int z = 0;
} int total_h = 0;
int* delays = NULL;
uint8_t* data = stbi_load_gif_from_memory(buff, buff_size, &delays, &w, &h, &z, &n, 0);
stbi_image_free((uint8_t*)(data)); return_value_if_fail(data != NULL, RET_FAIL);
total_h = h * z;
if (require_bgra) {
ret = bitmap_init_from_rgba(image, w, total_h, BITMAP_FMT_BGRA8888, data, n);
} else {
ret = bitmap_init_from_rgba(image, w, total_h, BITMAP_FMT_RGBA8888, data, n);
}
image->is_gif = TRUE;
image->gif_frame_h = h;
image->gif_frames_nr = z;
image->gif_delays = delays;
stbi_image_free((uint8_t*)(data));
}
return ret; return ret;
} }
static ret_t image_loader_stb_load(image_loader_t* l, const uint8_t* buff, uint32_t buff_size, static ret_t image_loader_stb_load(image_loader_t* l, const asset_info_t* asset, bitmap_t* image) {
bitmap_t* image) {
bool_t require_bgra = FALSE; bool_t require_bgra = FALSE;
bool_t enable_bgr565 = FALSE; bool_t enable_bgr565 = FALSE;
return_value_if_fail(l != NULL && buff != NULL && image != NULL, RET_BAD_PARAMS); return_value_if_fail(l != NULL && image != NULL, RET_BAD_PARAMS);
#ifdef WITH_BITMAP_BGR565 #ifdef WITH_BITMAP_BGR565
enable_bgr565 = TRUE; enable_bgr565 = TRUE;
@ -65,7 +88,8 @@ static ret_t image_loader_stb_load(image_loader_t* l, const uint8_t* buff, uint3
require_bgra = TRUE; require_bgra = TRUE;
#endif /*WITH_BITMAP_BGRA*/ #endif /*WITH_BITMAP_BGRA*/
return stb_load_image(buff, buff_size, image, require_bgra, enable_bgr565); return stb_load_image(asset->subtype, asset->data, asset->size, image, require_bgra,
enable_bgr565);
} }
static const image_loader_t stb_loader = {.load = image_loader_stb_load}; static const image_loader_t stb_loader = {.load = image_loader_stb_load};

View File

@ -29,8 +29,8 @@ BEGIN_C_DECLS
image_loader_t* image_loader_stb(void); image_loader_t* image_loader_stb(void);
/*for tool image_gen only*/ /*for tool image_gen only*/
ret_t stb_load_image(const uint8_t* buff, uint32_t buff_size, bitmap_t* image, bool_t require_bgra, ret_t stb_load_image(int32_t subtype, const uint8_t* buff, uint32_t buff_size, bitmap_t* image,
bool_t enable_bgr565); bool_t require_bgra, bool_t enable_bgr565);
END_C_DECLS END_C_DECLS

View File

@ -1,4 +1,5 @@
#include "base/mem.h" #include "base/fs.h"
#include "base/mem.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "tools/common/utils.h" #include "tools/common/utils.h"
#include "base/image_manager.h" #include "base/image_manager.h"
@ -11,13 +12,23 @@
#define PNG_OPAQUE_NAME TK_ROOT "/tests/testdata/test_opaque.png" #define PNG_OPAQUE_NAME TK_ROOT "/tests/testdata/test_opaque.png"
static ret_t load_image(const char* filename, bitmap_t* image) { static ret_t load_image(const char* filename, bitmap_t* image) {
uint32_t size = 0;
ret_t ret = RET_OK; ret_t ret = RET_OK;
image_loader_t* loader = image_loader_stb(); image_loader_t* loader = image_loader_stb();
printf("%s\n", filename); uint32_t size = file_get_size(filename);
uint8_t* buff = (uint8_t*)read_file(filename, &size); asset_info_t* info = (asset_info_t*)TKMEM_ALLOC(sizeof(asset_info_t) + size);
ret = image_loader_load(loader, buff, size, image); return_value_if_fail(info != NULL, RET_OOM);
TKMEM_FREE(buff);
memset(info, 0x00, sizeof(asset_info_t));
info->size = size;
info->type = ASSET_TYPE_IMAGE;
info->subtype = 0;
info->refcount = 1;
info->is_in_rom = FALSE;
strncpy(info->name, "name", NAME_LEN);
ENSURE(file_read_part(filename, info->data, size, 0) == size);
ret = image_loader_load(loader, info, image);
TKMEM_FREE(info);
return ret; return ret;
} }
@ -88,7 +99,7 @@ static ret_t load_image_ex(const char* filename, bitmap_t* image, bool_t require
ret_t ret = RET_OK; ret_t ret = RET_OK;
printf("%s\n", filename); printf("%s\n", filename);
uint8_t* buff = (uint8_t*)read_file(filename, &size); uint8_t* buff = (uint8_t*)read_file(filename, &size);
ret = stb_load_image(buff, size, image, require_bgra, enable_bgr565); ret = stb_load_image(0, buff, size, image, require_bgra, enable_bgr565);
TKMEM_FREE(buff); TKMEM_FREE(buff);
return ret; return ret;

View File

@ -61,7 +61,7 @@ int main(int argc, char** argv) {
buff = (uint8_t*)read_file(in_filename, &size); buff = (uint8_t*)read_file(in_filename, &size);
if (buff != NULL) { if (buff != NULL) {
if (stb_load_image(buff, size, &image, require_bgra, enable_bgr565) == RET_OK) { if (stb_load_image(0, buff, size, &image, require_bgra, enable_bgr565) == RET_OK) {
if (image_gen(&image, out_filename) == RET_OK) { if (image_gen(&image, out_filename) == RET_OK) {
printf("done\n"); printf("done\n");
} else { } else {