Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-01-26 22:25:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-26 22:27:16 +0300
commitaf87b6d8cb75d9d625378dee25d726a0d55f75c6 (patch)
treeb400a9a7e8d63dc2e60c45e988e969798c066d3b /source/blender/imbuf/intern/bmp.c
parent42d2c96d4cceab46de8eebf30497e7399a2998e0 (diff)
parent57dfec79f4ab1ceeb8c5f6049aa03e779e7871c0 (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.c4
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;