Add WEBP, TIFF, ICO, TGA, HDR, and EXR image import and more raster export formats (#4554)

* Add WEBP, TIFF, ICO, TGA, HDR, and EXR image import and more raster export file types

* Try a file as TGA only when no image format is recognized
This commit is contained in:
Keavon Chambers
2026-09-19 18:14:37 -07:00
parent 23e6b0f11d
commit 2ed5e775e5
16 changed files with 373 additions and 122 deletions
+6
View File
@@ -604,6 +604,11 @@ mod editor_commands {
ClipboardMessage::ReadSelection { content, cut }.into()
}
/// The pixels of an export that `TriggerExportImage` had the frontend rasterize, which the editor encodes and saves as the chosen file type
fn save_rasterized_export(name: String, file_type: FileType, width: u32, height: u32, data: Vec<u8>) -> Message {
PortfolioMessage::SaveRasterizedExport { name, file_type, width, height, data }.into()
}
/// A file headed for a known action, picked in the dialog that `TriggerBrowse` opened
fn ingest_picked(name: String, mime_type: String, data: Vec<u8>, action: IngestAction) -> Message {
IngestMessage::Ingest {
@@ -743,6 +748,7 @@ macro_rules! editor_proxy_types {
}
editor_proxy_types! {
FileType = editor::messages::frontend::utility_types::FileType;
IngestAction = editor::messages::portfolio::ingest::utility_types::IngestAction;
LayoutTarget = editor::messages::layout::utility_types::layout_widget::LayoutTarget;
DockingSplitDirection = editor::messages::portfolio::utility_types::DockingSplitDirection;