1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:37:34 +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:
Jelle Raaijmakers 2023-08-08 20:22:54 +02:00 committed by Daniel Bertalan
parent e272f796ad
commit 1c19c2bc92
5 changed files with 13 additions and 9 deletions

View file

@ -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;