metadata: fix failure to get exif data for compressed SWF files.
Fix Exiftool not being able to get the metadata for compressed SWF files. Exiftool requires Compress::Zlib as an optional dependency to decompress compressed SWF files, but it wasn't in the Docker image. Archive::Zip is required for Zip files and Digest::MD5 for certain other metadata (see "DEPENDENCIES" in exiftool README).
This commit is contained in:
@@ -180,6 +180,16 @@ class MediaFileTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
context "a compressed SWF file" do
|
||||
should "get all the metadata" do
|
||||
@metadata = MediaFile.open("test/files/compressed.swf").metadata
|
||||
|
||||
assert_equal(true, @metadata["Flash:Compressed"])
|
||||
assert_not_equal("Install Compress::Zlib to extract compressed information", @metadata["ExifTool:Warning"])
|
||||
assert_equal(6, @metadata.count)
|
||||
end
|
||||
end
|
||||
|
||||
context "a greyscale image without an embedded color profile" do
|
||||
should "successfully generate a thumbnail" do
|
||||
@image = MediaFile.open("test/files/test-grey-no-profile.jpg")
|
||||
|
||||
Reference in New Issue
Block a user