mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
PixelPaint: Guess image type based on its filename
We do this in ImageViewer so it understands TGA images; let's do it in PixelPaint as well :^)
This commit is contained in:
parent
e272f796ad
commit
1c19c2bc92
5 changed files with 13 additions and 9 deletions
|
@ -1288,7 +1288,7 @@ void MainWidget::set_mask_actions_for_layer(Layer* layer)
|
|||
|
||||
void MainWidget::open_image(FileSystemAccessClient::File file)
|
||||
{
|
||||
auto try_load = m_loader.load_from_file(file.release_stream());
|
||||
auto try_load = m_loader.load_from_file(file.filename(), file.release_stream());
|
||||
if (try_load.is_error()) {
|
||||
GUI::MessageBox::show_error(window(), MUST(String::formatted("Unable to open file: {}, {}", file.filename(), try_load.release_error())));
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue