diff options
| author | 2017-08-13 15:53:36 +1000 | |
|---|---|---|
| committer | 2017-08-13 15:53:36 +1000 | |
| commit | 44bc3ffa43cdd4cdd886d025d2aacd4da3d357da (patch) | |
| tree | 639f9ab71f86c6fde652408c594e903f18d2fa81 /src/emu/rendutil.cpp | |
| parent | 90593ab006312549a9e523df732eada10125eee3 (diff) | |
png: support 16-bit samples
Diffstat (limited to 'src/emu/rendutil.cpp')
| -rw-r--r-- | src/emu/rendutil.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/rendutil.cpp b/src/emu/rendutil.cpp index 01691af4374..c8d120f616a 100644 --- a/src/emu/rendutil.cpp +++ b/src/emu/rendutil.cpp @@ -647,14 +647,6 @@ bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, if (result != PNGERR_NONE) return false; - // verify we can handle this PNG - if (png.bit_depth > 8) - { - osd_printf_error("%s: Unsupported bit depth %d (8 bit max)\n", filename, png.bit_depth); - png_free(&png); - return false; - } - // if less than 8 bits, upsample if (PNGERR_NONE != png_expand_buffer_8bit(&png)) { @@ -674,6 +666,14 @@ bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, } else if (png.width == bitmap.width() && png.height == bitmap.height()) { + // verify we can handle this PNG + if (png.bit_depth > 8) + { + osd_printf_error("%s: Unsupported bit depth %d (8 bit max)\n", filename, png.bit_depth); + png_free(&png); + return false; + } + // alpha case hasalpha = copy_png_alpha_to_bitmap(bitmap, &png); } |
