2024-10-04 20:16:47 +00:00
|
|
|
[package]
|
|
|
|
name = "bevy_image"
|
|
|
|
version = "0.15.0-dev"
|
|
|
|
edition = "2021"
|
|
|
|
description = "Provides image types for Bevy Engine"
|
|
|
|
homepage = "https://bevyengine.org"
|
|
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
keywords = ["bevy"]
|
|
|
|
|
|
|
|
[features]
|
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
|
|
|
# Image formats
|
|
|
|
basis-universal = ["dep:basis-universal"]
|
|
|
|
bmp = ["image/bmp"]
|
|
|
|
dds = ["ddsfile"]
|
2024-10-04 20:16:47 +00:00
|
|
|
exr = ["image/exr"]
|
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
|
|
|
ff = ["image/ff"]
|
|
|
|
gif = ["image/gif"]
|
2024-10-04 20:16:47 +00:00
|
|
|
hdr = ["image/hdr"]
|
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
|
|
|
ktx2 = ["dep:ktx2"]
|
|
|
|
ico = ["image/ico"]
|
2024-10-04 20:16:47 +00:00
|
|
|
jpeg = ["image/jpeg"]
|
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
|
|
|
png = ["image/png"]
|
2024-10-04 20:16:47 +00:00
|
|
|
pnm = ["image/pnm"]
|
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
|
|
|
qoi = ["image/qoi"]
|
|
|
|
tga = ["image/tga"]
|
|
|
|
tiff = ["image/tiff"]
|
|
|
|
webp = ["image/webp"]
|
2024-10-04 20:16:47 +00:00
|
|
|
|
|
|
|
# For ktx2 supercompression
|
|
|
|
zlib = ["flate2"]
|
|
|
|
zstd = ["ruzstd"]
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
bevy_asset = { path = "../bevy_asset", version = "0.15.0-dev" }
|
|
|
|
bevy_color = { path = "../bevy_color", version = "0.15.0-dev", features = [
|
|
|
|
"serialize",
|
|
|
|
"wgpu-types",
|
|
|
|
] }
|
|
|
|
bevy_math = { path = "../bevy_math", version = "0.15.0-dev" }
|
|
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.15.0-dev", features = [
|
|
|
|
"bevy",
|
|
|
|
] }
|
|
|
|
bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" }
|
|
|
|
|
|
|
|
# rendering
|
|
|
|
image = { version = "0.25.2", default-features = false }
|
|
|
|
|
|
|
|
# misc
|
|
|
|
bitflags = { version = "2.3", features = ["serde"] }
|
|
|
|
bytemuck = { version = "1.5" }
|
2024-11-05 21:18:48 +00:00
|
|
|
wgpu = { version = "23", default-features = false }
|
2024-10-04 20:16:47 +00:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
2024-10-09 14:23:53 +00:00
|
|
|
derive_more = { version = "1", default-features = false, features = [
|
|
|
|
"error",
|
|
|
|
"from",
|
|
|
|
"display",
|
|
|
|
] }
|
2024-10-04 20:16:47 +00:00
|
|
|
futures-lite = "2.0.1"
|
|
|
|
ddsfile = { version = "0.5.2", optional = true }
|
|
|
|
ktx2 = { version = "0.3.0", optional = true }
|
|
|
|
# For ktx2 supercompression
|
|
|
|
flate2 = { version = "1.0.22", optional = true }
|
|
|
|
ruzstd = { version = "0.7.0", optional = true }
|
|
|
|
# For transcoding of UASTC/ETC1S universal formats, and for .basis file support
|
|
|
|
basis-universal = { version = "0.3.0", optional = true }
|
|
|
|
|
|
|
|
[lints]
|
|
|
|
workspace = true
|
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
|
|
|
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
|
|
|
|
all-features = true
|