Commit 17ce276
committed
Replace FreeImage dependency with stb
This removes FreeImage dependency. This library is full of security
vulnerabilities [1][2] and distributions such as NixOS and Arch no
longer ship it, making it difficult to build Gazebo there. It's not an
option to replace FreeImage with its fork called FreeImageRe [3],
which fixes some of the vulnerabilities, because many of them still
seem to be present. Therefore, we replace FreeImage with the stb
project [4], which seems to have better security track record [5]. We
vendor the header files from the project from its commit
f1c79c0 ("Merge pull request 1851 from jeffrbig2/master", 2025-10-25).
With this implementation all tests pass, but it is quite likely that
some things will behave differently. Likely the support of 16-bit or
HDR (32-bit float) images will behave differently. For example, PNG
saving is supported only for 8-bit images.
[1]: https://security-tracker.debian.org/tracker/source-package/freeimage
[2]: https://www.cvedetails.com/vendor/15676/
[3]: https://github.com/agruzdev/FreeImageRe
[4]: https://github.com/nothings/stb
[5]: https://www.cvedetails.com/vendor/19263/Stb-Project.html
Closes #388
Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>1 parent 58c6eaa commit 17ce276
File tree
8 files changed
+20693
-435
lines changed- graphics/src
- tutorials
8 files changed
+20693
-435
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
0 commit comments