1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Guilherme Mansur
6133dad869 Don't fail ImageAnalyzer on unsupported types
Fix: #36065

The IamgeAnalyzer passes a image to ImageMagick without checking if the
image is supported by ImageMagick. This patch checks that image is
supported and if not logs an error and returns an empty hash instead of
raising an error. This is the same error handling we do when we
encounter a LoadError when mini_magick is not installed.
2019-04-24 07:59:12 -04:00
Ricardo Díaz
36e0ac3b53 Move #extract_metadata_from to ActiveStorage's TestHelper
ImageAnalyzerTest and VideoAnalyzerTest are defining the same helper,
since both use `#create_file_blob` that is defined in TestHelper, it
makes sense to move `#extract_metadata_from` to that side.
2018-04-25 15:28:30 -05:00
George Claghorn
57cc6f4030 Correct orientation detection 2018-01-31 16:50:30 -05:00
George Claghorn
f9b806eaa1 Swap encoded image width and height if angle is 90 or 270 degrees 2018-01-31 15:43:29 -05:00
George Claghorn
cf1c48478d Cope with videos with undefined display aspect ratios 2018-01-20 14:47:09 -05:00
George Claghorn
9b0c74e878 Use helper method 2018-01-19 18:46:59 -05:00
George Claghorn
2450fc24e3 Preserve display aspect ratio for videos with rectangular samples 2018-01-19 10:47:34 -05:00
George Claghorn
c2ba530c43
Extract content types from blob data 2018-01-15 13:06:17 -05:00
George Claghorn
316d87e412 Append extension to tempfile name
Fixes analyzing an SVG image without an XML declaration. ImageMagick occasionally looks to the extension when it can't discern the type of an image file from its contents.

References #31356.
2017-12-31 10:36:58 -05:00
George Claghorn
da8e0ba03c Swap raw video width and height if angle is 90 or 270 degrees 2017-12-08 13:15:04 -05:00
George Claghorn
605484079d Extract metadata from images and videos 2017-10-22 13:16:59 -04:00