[Thumbnail providers] Cover errors and edge cases (#23947)

* [Thumbnail providers] Cover errors and edge cases

* Add TODO comment

* Fix tests
This commit is contained in:
Stefan Markovic
2023-02-07 21:11:31 +01:00
committed by GitHub
parent c180150d54
commit 53f0b00328
16 changed files with 104 additions and 73 deletions

View File

@@ -26,8 +26,11 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
_thumbnailProvider = new SvgThumbnailProvider(filePath);
Bitmap thumbnail = _thumbnailProvider.GetThumbnail(cx);
filePath = filePath.Replace(".svg", ".bmp");
thumbnail.Save(filePath, System.Drawing.Imaging.ImageFormat.Bmp);
if (thumbnail != null )
{
filePath = filePath.Replace(".svg", ".bmp");
thumbnail.Save(filePath, System.Drawing.Imaging.ImageFormat.Bmp);
}
}
else
{