bevyengine/bevy · error · SaveImageError
the image uses a texture format "{1:?}" that is not supporte
Error message
the image uses a texture format "{1:?}" that is not supported for saving by the image format "{0:?}" What it means
SaveImageError variant raised when the image's TextureFormat is not encodable by the chosen output file format, e.g. saving a compressed or float texture to PNG. The image texture format and target file format are held in the payload; convert to a compatible texture format first.
Source
Thrown at crates/bevy_image/src/saver.rs:144
/// An error while saving an image.
#[derive(Error, Debug)]
pub enum SaveImageError {
/// Cannot deduce file format from extension because there is no extension.
#[error("SaveImageFormatSetting::FromExtension was set, but the asset path \"{0}\" has no extension")]
MissingExtension(AssetPath<'static>),
/// Cannot deduce file format from extension since this extension is unknown. Holds the
/// extension that could not be matched.
#[error("could not determine asset format for extension \"{0}\"")]
UnknownExtension(String),
/// [`Image::data`] is [`None`], so there is no data to save. See
/// [`RenderAssetUsages`](bevy_asset::RenderAssetUsages) for more.
#[error("the provided image does not contain any pixel data. Its data may live on the GPU (which we can't save out) due to `RenderAssetUsages`")]
ImageMissingData,
/// The image saver doesn't support the file format being requested.
#[error("the requested file format {0:?} is not supported for saving")]
UnsupportedFormat(ImageFormat),
/// The image saver doesn't support the texture format of the image data for the image format.
#[error("the image uses a texture format \"{1:?}\" that is not supported for saving by the image format \"{0:?}\"")]
UnsupportedSaveColorTypeForFormat(ImageFormat, TextureFormat),
/// The [`image`] crate returned an error.
#[error(transparent)]
ImageError(#[from] image::ImageError),
/// Writing the bytes returned an error.
#[error(transparent)]
IoError(#[from] std::io::Error),
}
#[cfg(test)]
mod tests {
use std::path::Path;
use bevy_app::{App, TaskPoolPlugin};
use bevy_asset::{
io::{
memory::{Dir, MemoryAssetReader, MemoryAssetWriter},
AssetSourceBuilder, AssetSourceId,View on GitHub (pinned to 396ca72708)
Solutions
- Convert the image's texture format to one supported by the target file format before saving
- Choose a file format that supports the texture format (e.g. Png for Rgba8)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/bevy_image/src/saver.rs:144 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/0dc91f82afc2992d.
Report an issue: GitHub.