mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-10 17:29:08 +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))
|
||||
{
|
||||
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.AutoOrient();
|
||||
|
||||
|
Reference in New Issue
Block a user