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

7 commits

Author SHA1 Message Date
Ryuta Kamizono
52132133aa Fix typo s/:heigh/:height/ 2019-10-03 15:42:47 +09:00
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
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
605484079d Extract metadata from images and videos 2017-10-22 13:16:59 -04:00