From 062f3ad035cba43b726a9fbed3637498d383c490 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Sun, 6 Mar 2011 02:40:16 +0000 Subject: [PATCH] fix external library path. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1310 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/rtgui/common/image_jpg.c | 18 +++++++++++++++++- components/rtgui/common/image_png.c | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/components/rtgui/common/image_jpg.c b/components/rtgui/common/image_jpg.c index c445c6a14f..decf6de8c7 100644 --- a/components/rtgui/common/image_jpg.c +++ b/components/rtgui/common/image_jpg.c @@ -4,12 +4,16 @@ #ifdef RTGUI_IMAGE_JPEG #include #include -#include "jpeg/jpeglib.h" +#include "jpeglib.h" #include #include #include +#ifdef RTGUI_USING_DFS_FILERW +#include +#endif + static rt_bool_t rtgui_image_jpeg_check(struct rtgui_filerw* file); static rt_bool_t rtgui_image_jpeg_load(struct rtgui_image* image, struct rtgui_filerw* file, rt_bool_t load); static void rtgui_image_jpeg_unload(struct rtgui_image* image); @@ -44,6 +48,16 @@ struct rtgui_image_engine rtgui_image_jpeg_engine = rtgui_image_jpeg_blit }; +struct rtgui_image_engine rtgui_image_jpg_engine = +{ + "jpg", + {RT_NULL}, + rtgui_image_jpeg_check, + rtgui_image_jpeg_load, + rtgui_image_jpeg_unload, + rtgui_image_jpeg_blit +}; + #define INPUT_BUFFER_SIZE 4096 typedef struct { struct jpeg_source_mgr pub; @@ -271,6 +285,8 @@ void rtgui_image_jpeg_init() { /* register jpeg on image system */ rtgui_image_register_engine(&rtgui_image_jpeg_engine); + /* register jpg on image system */ + rtgui_image_register_engine(&rtgui_image_jpg_engine); } static void my_error_exit(j_common_ptr cinfo) diff --git a/components/rtgui/common/image_png.c b/components/rtgui/common/image_png.c index 0c63e80cf8..9c72ef02f4 100644 --- a/components/rtgui/common/image_png.c +++ b/components/rtgui/common/image_png.c @@ -2,7 +2,7 @@ #include #ifdef RTGUI_IMAGE_PNG -#include "libpng/png.h" +#include "png.h" #include #define PNG_MAGIC_LEN 8