diff options
author | Matt Sarett <msarett@google.com> | 2016-05-19 21:26:12 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-05-19 21:26:12 +0200 |
commit | 86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5 (patch) | |
tree | 5968b6a0a9c7b008d733bcd7bfda0ee2200c2edb /minui/resources.c | |
parent | Track usage of Vector / SortedVector from libutils DO NOT MERGE (diff) | |
parent | DO NOT MERGE Use updated libpng API (diff) | |
download | android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.tar android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.tar.gz android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.tar.bz2 android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.tar.lz android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.tar.xz android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.tar.zst android_bootable_recovery-86a28d0aaf438f5fbf8c424dc7d2d30553f14bd5.zip |
Diffstat (limited to 'minui/resources.c')
-rw-r--r-- | minui/resources.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/minui/resources.c b/minui/resources.c index 72f39fbaa..a370b7108 100644 --- a/minui/resources.c +++ b/minui/resources.c @@ -93,9 +93,9 @@ 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); - 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) || @@ -105,8 +105,8 @@ int res_create_surface(const char* name, gr_surface* pSurface) { goto exit; } - 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 = (color_type == PNG_COLOR_TYPE_GRAY ? 1 : 4) * width; size_t pixelSize = stride * height; @@ -246,13 +246,13 @@ int res_create_localized_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; - 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 == 1 && color_type == PNG_COLOR_TYPE_GRAY))) { |