diff options
author | Chao Yang <chao.yang@linaro.org> | 2011-11-14 14:23:22 +0000 |
---|---|---|
committer | Zach Pfeffer <zach.pfeffer@linaro.org> | 2011-12-17 21:43:06 -0600 |
commit | 8b2f7f8e20d461f7144073506b3c41a66812d7e3 (patch) | |
tree | 50e1aa19ea6b4ddc6d9280a3a84367a75f94e894 | |
parent | e9e21ac662d26a0fd8efcd4c0fef78ccd5845563 (diff) | |
download | recovery-linaro_android_4.0.1.tar.gz |
recovery: update interfaces to libpng 1.5.7 beta 01linaro_android_4.0.1
libpng 1.5.7 beta 01 is integrated, where some interfaces are
changed and some structures are not visible to libpng clients
any more. The structure information can be retrieved through
specific interfaces. libpng.a needs to be linked with libm.a.
This commit includes interface changes to minui/resources.c
Change-Id: I9b59ac2a7d319526b0da987a0ff1930ee07b23bc
Signed-off-by: Tony Mansson <tony.mansson@linaro.org>
-rw-r--r-- | minui/resources.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/minui/resources.c b/minui/resources.c index b437a87c..08dab96f 100644 --- a/minui/resources.c +++ b/minui/resources.c @@ -91,14 +91,14 @@ int res_create_surface(const char* name, gr_surface* pSurface) { png_set_sig_bytes(png_ptr, sizeof(header)); png_read_info(png_ptr, info_ptr); - size_t width = info_ptr->width; - size_t height = info_ptr->height; + size_t width = png_get_image_width(png_ptr, info_ptr); + size_t height = png_get_image_height(png_ptr, info_ptr); size_t stride = 4 * width; size_t pixelSize = stride * height; - int color_type = info_ptr->color_type; - int bit_depth = info_ptr->bit_depth; - int channels = info_ptr->channels; + int color_type = png_get_color_type(png_ptr, info_ptr); + int bit_depth = png_get_bit_depth(png_ptr, info_ptr); + int channels = png_get_channels(png_ptr, info_ptr); if (!(bit_depth == 8 && ((channels == 3 && color_type == PNG_COLOR_TYPE_RGB) || (channels == 4 && color_type == PNG_COLOR_TYPE_RGBA) || |