bevy/docs
Clar Fon 8adc9e9d6e
Feature-gate all image formats (#15586)
# Objective

Bevy supports feature gates for each format it supports, but several
formats that it loads via the `image` crate do not have feature gates.
Additionally, the QOI format is supported by the `image` crate and
wasn't available at all. This fixes that.

## Solution

The following feature gates are added:

* `avif`
* `ff` (Farbfeld)
* `gif`
* `ico`
* `qoi`
* `tiff`

None of these formats are enabled by default, despite the fact that all
these formats appeared to be enabled by default before. Since
`default-features` was disabled for the `image` crate, it's likely that
using any of these formats would have errored by default before this
change, although this probably needs additional testing.

## Testing

The changes seemed minimal enough that a compile test would be
sufficient.

## Migration guide

Image formats that previously weren't feature-gated are now
feature-gated, meaning they will have to be enabled if you use them:

* `avif`
* `ff` (Farbfeld)
* `gif`
* `ico`
* `tiff`

Additionally, the `qoi` feature has been added to support loading QOI
format images.

Previously, these formats appeared in the enum by default, but weren't
actually enabled via the `image` crate, potentially resulting in weird
bugs. Now, you should be able to add these features to your projects to
support them properly.
2024-10-07 16:37:45 +00:00
..
cargo_features.md Feature-gate all image formats (#15586) 2024-10-07 16:37:45 +00:00
debugging.md Replace the wgpu_trace feature with a field in bevy_render::settings::WgpuSettings (#14842) 2024-08-25 14:16:11 +00:00
linters.md Allow clippy::type_complexity in more places. (#9796) 2023-10-02 21:55:16 +00:00
linux_dependencies.md Note on compiling on FreeBSD (#15232) 2024-09-16 23:18:14 +00:00
profiling.md Add Mac OS tracy info to profiling docs (#13826) 2024-07-08 01:21:52 +00:00