# HG changeset patch # User wycc # Date 1236484034 -28800 # Node ID d0408540458364d169f77fa5298b5eeff0fe09e0 # Parent ab7f3c00fd0546a147dba0300ecdd0f743cdff2f# Parent bb6e964da1c849e879166e02799bdc048c51b495 Remove jpg sinc ethe image loader is not ready yet. diff -r ab7f3c00fd05 -r d04085404583 examples/menu/filebrowser.c --- a/examples/menu/filebrowser.c Sun Mar 08 11:46:09 2009 +0800 +++ b/examples/menu/filebrowser.c Sun Mar 08 11:47:14 2009 +0800 @@ -102,7 +102,7 @@ printf("check %s\n",s); - if (endWith(s,".jpg") || endWith(s,".png")) { + if (endWith(s,".png")) { snprintf(path,1024,"%s%s", data->curDir,data->titles[select]); mypreview(data,path); } diff -r ab7f3c00fd05 -r d04085404583 include/mb_shapes.h --- a/include/mb_shapes.h Sun Mar 08 11:46:09 2009 +0800 +++ b/include/mb_shapes.h Sun Mar 08 11:47:14 2009 +0800 @@ -244,6 +244,7 @@ co_aix w, co_aix h); extern int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data, co_aix x, co_aix y, co_aix w, co_aix h); +extern mb_img_data_t *sh_image_get_img_data(shape_t *shape); /* @} */ /* @} */ diff -r ab7f3c00fd05 -r d04085404583 src/shape_image.c --- a/src/shape_image.c Sun Mar 08 11:46:09 2009 +0800 +++ b/src/shape_image.c Sun Mar 08 11:47:14 2009 +0800 @@ -210,3 +210,10 @@ return OK; } +mb_img_data_t *sh_image_get_img_data(shape_t *shape) { + sh_image_t *img = (sh_image_t *)shape; + + ASSERT(shape->obj.obj_type == MBO_IMAGE); + + return img->img_data; +}