mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 10:19:07 +00:00
Fix #292: Handle possible exception when changing colour profile
This commit is contained in:
@@ -53,7 +53,15 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage
|
|||||||
{
|
{
|
||||||
using (var image = new MagickImage(_path))
|
using (var image = new MagickImage(_path))
|
||||||
{
|
{
|
||||||
image.AddProfile(ColorProfile.SRGB);
|
try
|
||||||
|
{
|
||||||
|
image.AddProfile(ColorProfile.SRGB);
|
||||||
|
}
|
||||||
|
catch (MagickResourceLimitErrorException)
|
||||||
|
{
|
||||||
|
// https://github.com/xupefei/QuickLook/issues/292: ColorspaceColorProfileMismatch
|
||||||
|
}
|
||||||
|
|
||||||
image.Density = new Density(Math.Floor(image.Density.X), Math.Floor(image.Density.Y));
|
image.Density = new Density(Math.Floor(image.Density.X), Math.Floor(image.Density.Y));
|
||||||
image.AutoOrient();
|
image.AutoOrient();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user