Merge pull request #11032 from demarches-simplifiees/catch-minimagick-error
Technique : gestion d'une erreur de ImageProcessorJob
This commit is contained in:
commit
00302b858c
1 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,11 @@ class UninterlaceService
|
|||
|
||||
def interlaced?(png_path)
|
||||
return false if png_path.blank?
|
||||
begin
|
||||
png = MiniMagick::Image.open(png_path)
|
||||
rescue MiniMagick::Invalid
|
||||
return false
|
||||
end
|
||||
png.data["interlace"] != "None"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue