mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add support when image format is not support
This commit is contained in:
parent
129169e0a9
commit
a8d69c7dd9
1 changed files with 10 additions and 3 deletions
|
|
@ -215,8 +215,15 @@ namespace Flow.Launcher.Infrastructure.Image
|
||||||
type = ImageType.ImageFile;
|
type = ImageType.ImageFile;
|
||||||
if (loadFullImage)
|
if (loadFullImage)
|
||||||
{
|
{
|
||||||
image = LoadFullImage(path);
|
try
|
||||||
type = ImageType.FullImageFile;
|
{
|
||||||
|
image = LoadFullImage(path);
|
||||||
|
type = ImageType.FullImageFile;
|
||||||
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
|
{
|
||||||
|
image = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -242,7 +249,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
||||||
|
|
||||||
if (type != ImageType.Error)
|
if (type != ImageType.Error)
|
||||||
{
|
{
|
||||||
image.Freeze();
|
image?.Freeze();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ImageResult(image, type);
|
return new ImageResult(image, type);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue