mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 05:08:12 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user