bevy/crates/bevy_render
micron-mushroom cbb884cb02 Expose Image conversion functions (fixes #5452) (#5527)
## Solution
Exposes the image <-> "texture" as methods on `Image`.

## Extra
I'm wondering if `image_texture_conversion.rs` should be renamed to `image_conversion.rs`. That or the file be deleted altogether in favour of putting the code alongside the rest of the `Image` impl. Its kind-of weird to refer to the `Image`  as a texture.

Also `Image::convert` is a public method so I didn't want to edit its signature, but it might be nice to have the function consume the image instead of just passing a reference to it because it would eliminate a clone.

## Changelog
> Rename `image_to_texture` to `Image::from_dynamic`
> Rename `texture_to_image` to `Image::try_into_dynamic`
> `Image::try_into_dynamic` now returns a `Result` (this is to make it easier for users who didn't read that only a few conversions are supported to figure it out.)
2022-09-03 17:47:38 +00:00
..
macros Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00
src Expose Image conversion functions (fixes #5452) (#5527) 2022-09-03 17:47:38 +00:00
Cargo.toml Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00