Andrii Doroshenko (Xrayez)
9114357bc5
Fix BMP loader to distinguish between compression types
...
Some of the values in compression enumeration represent uncompressed formats:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57
This allows the loader to proceed with uncompressed formats.
Note that loading compressed BMP's is still not supported.
(cherry picked from commit 422a8ffe02
)
2019-09-26 14:42:51 +02:00
Andrii Doroshenko (Xrayez)
f8dce7ade9
Fix BMP loader incorrectly interpreting color table size
...
Color table should exist for images with bit count <= 8. Importing 16-bit
BMP images could also likely have a color table but they're not currently
supported in Godot.
(cherry picked from commit d5c5aabbf2
)
2019-09-26 14:42:13 +02:00
Andrii Doroshenko (Xrayez)
5dd3d3dadf
Import 4/1 bit bmp images
...
Add some sanity checks according to bmp specification.
Read color table and index data within the same scope and
then simply extend the color palette.
This particular implementation has one limitation: not all 4/1 bit images
can be imported as it requires bit unpacking (size dimensions must be
a multiple of 8 for 1-bit and 2 (even) for 4-bit images).
(cherry picked from commit 6484da5721
)
2019-09-26 14:41:27 +02:00
Shinryuuji
c6ee986f53
Add support for 8bpp bmp files
...
(cherry picked from commit b9578b8f46
)
2019-09-26 14:41:04 +02:00
Rémi Verschelde
b16c309f82
Update copyright statements to 2019
...
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
95131e6f23
Fix warnings on release builds (not DEBUG_ENABLED)
...
Fixes the following Clang 5 warnings:
```
modules/bmp/image_loader_bmp.cpp:46:60: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
modules/bmp/image_loader_bmp.cpp:48:61: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
drivers/png/image_loader_png.cpp:231:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
scene/gui/graph_edit.cpp:1045:8: warning: comparison of constant 0 with expression of type 'bool' is always false [-Wtautological-constant-out-of-range-compare]
core/class_db.cpp:812:13: warning: unused variable 'check' [-Wunused-variable]
core/io/file_access_pack.cpp:172:11: warning: unused variable 'ver_rev' [-Wunused-variable]
core/math/bsp_tree.cpp:195:13: warning: unused variable 'plane' [-Wunused-variable]
core/math/bsp_tree.cpp:168:6: warning: unused variable 'plane_count' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:685:10: warning: unused variable 'ok' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:706:10: warning: unused variable 'ok' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:755:19: warning: unused variable 'var_type' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:1306:12: warning: unused variable 'err' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:158:15: warning: unused function '_get_var_type' [-Wunused-function]
modules/gdscript/gdscript_parser.cpp:750:20: warning: unused variable 'lv' [-Wunused-variable]
modules/gdscript/gdscript_parser.cpp:59:15: warning: unused function '_find_function_name' [-Wunused-function]
scene/main/node.cpp:2489:13: warning: unused function '_Node_debug_sn' [-Wunused-function]
```
2018-10-03 17:34:55 +02:00
Saracen
115f6d14a0
Fix bits_per_pixel validation in BMP and TGA loader modules.
2018-07-08 18:51:20 +01:00
Saracen
e30b0656e8
BMP module
2018-04-30 01:33:14 +01:00