MediaFile: replace APNGInspector with ExifTool.

Replace our own handwritten APNG parser with ExifTool. This makes
ExifTool a hard requirement for handling APNGs.
This commit is contained in:
evazion
2021-09-21 03:53:06 -05:00
parent 273be55de8
commit ae7d964bf1
5 changed files with 54 additions and 178 deletions

View File

@@ -80,7 +80,7 @@ class MediaFile::Image < MediaFile
end
def is_animated_png?
file_ext == :png && APNGInspector.new(file.path).inspect!.animated?
file_ext == :png && metadata.fetch("PNG:AnimationFrames", 1) > 1
end
# @return [Vips::Image] the Vips image object for the file