diff --git a/app/services/uninterlace_service.rb b/app/services/uninterlace_service.rb index 0ec100e38..72b51b63e 100644 --- a/app/services/uninterlace_service.rb +++ b/app/services/uninterlace_service.rb @@ -18,7 +18,11 @@ class UninterlaceService def interlaced?(png_path) return false if png_path.blank? - png = MiniMagick::Image.open(png_path) + begin + png = MiniMagick::Image.open(png_path) + rescue MiniMagick::Invalid + return false + end png.data["interlace"] != "None" end end