diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-26 22:25:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-26 22:27:16 +0300 |
commit | af87b6d8cb75d9d625378dee25d726a0d55f75c6 (patch) | |
tree | b400a9a7e8d63dc2e60c45e988e969798c066d3b /source/blender/imbuf/intern/bmp.c | |
parent | 42d2c96d4cceab46de8eebf30497e7399a2998e0 (diff) | |
parent | 57dfec79f4ab1ceeb8c5f6049aa03e779e7871c0 (diff) |
Merge branch 'master' into draw-viewport-data
# Conflicts:
# source/blender/draw/DRW_engine_types.h
# source/blender/draw/intern/draw_manager.c
# source/blender/draw/intern/draw_manager.h
# source/blender/draw/intern/draw_manager_profiling.c
# source/blender/draw/intern/draw_manager_text.h
# source/blender/draw/intern/draw_texture_pool.cc
# source/blender/draw/intern/draw_texture_pool.h
# source/blender/draw/intern/draw_view_data.cc
# source/blender/draw/intern/draw_view_data.h
# source/blender/editors/space_view3d/view3d_draw.c
# source/blender/gpu/GPU_texture.h
# source/blender/gpu/GPU_viewport.h
# source/blender/gpu/intern/gpu_shader_create_info_private.hh
# source/blender/gpu/intern/gpu_viewport.c
Diffstat (limited to 'source/blender/imbuf/intern/bmp.c')
-rw-r--r-- | source/blender/imbuf/intern/bmp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 70bb70ec4fa..b44b12999bf 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -151,8 +151,7 @@ ImBuf *imb_bmp_decode(const uchar *mem, size_t size, int flags, char colorspace[ } /* Validate and cross-check offsets and sizes. */ - if (x < 1 || - !(depth == 1 || depth == 4 || depth == 8 || depth == 16 || depth == 24 || depth == 32)) { + if (x < 1 || !(ELEM(depth, 1, 4, 8, 16, 24, 32))) { return NULL; } @@ -307,7 +306,6 @@ static int putShortLSB(ushort us, FILE *ofile) return putc((us >> 8) & 0xFF, ofile); } -/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */ bool imb_savebmp(ImBuf *ibuf, const char *filepath, int UNUSED(flags)) { BMPINFOHEADER infoheader; |