Commit Graph

21 Commits

Author SHA1 Message Date
Breno Gazzola b4e394767d Reduce file size of tiff image in Active Storage 2021-08-12 11:37:44 -03:00
Abhay Nikam 13722000ba Remove warning logged for vips variant test cases 2021-08-11 11:54:33 +05:30
Breno Gazzola dd85734d2f Add metadata value for presence of audio channel in video blobs 2021-06-09 08:32:18 -03:00
Breno Gazzola d2c5babf4b Add audio analyzer to active storage 2021-06-08 16:11:00 -03:00
Sean Doyle c0f33b923b
Improve Fixture support for Active Storage (#41065)
* Improve Fixture support for Active Storage

Inspired by [76b33aa][], this commit extends the Active Storage
documentation to elaborate on how to declare fixtures.

In support of that, also introduce the `ActiveStorage::FixtureSet.blob`
method for injecting in-line [ActiveStorage::Blob][] attributes directly
into fixture YAML.

[76b33aa]: 76b33aa3d1
[ActiveStorage::Blob]: https://edgeapi.rubyonrails.org/classes/ActiveStorage/Blob.html

* Extra CR for style

* Two-space indention

* Explaining variable didn't explain, inline for style

Co-authored-by: David Heinemeier Hansson <david@loudthinking.com>
2021-01-24 11:10:30 +01:00
Vincent Robert 3803671a81 Generate a preview without print margins
When a PDF is used for both printing and displaying. It will most likely
contain a crop box in order to hide print margins when displaying the PDF.

Use Poppler's parameter to automatically use the crop box (visible box)
rather than the media box (printable box) in order to remove those margins
when drawing the PDF.

See https://manpages.debian.org/testing/poppler-utils/pdftoppm.1.en.html
2020-09-17 11:59:45 -04:00
Jonathan Hefner a197d39e13
Fall back to video container for duration
Some video formats, such as WebM, do not store duration information at
the level of the video stream.  Instead, the duration is stored as part
of the container format information.

This commit modifies `VideoAnalyzer` to use the duration from the video
container when the duration from the video stream is not available.

Fixes #40130.
2020-08-31 08:48:06 -04:00
Ershad Kunnakkadan 5fa6841028
Use a smaller TIFF file as fixture 2019-07-27 23:08:49 +05:30
Younes SERRAJ bcf370d689 Allow ActiveStorage to generate variants of BMP images 2019-04-21 19:07:22 +02:00
Luciano Sousa c329d323fc Permit generating variants of TIFF images 2018-12-30 18:14:49 -05:00
Marcelo Perini Veloso 0d4ba40688 Fix zero-byte files upload 2018-09-06 20:04:21 -03:00
George Claghorn 3915a470d2 Support varying ICO files
Closes #32096.
2018-02-24 15:27:57 -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 2450fc24e3 Preserve display aspect ratio for videos with rectangular samples 2018-01-19 10:47:34 -05:00
George Claghorn 921b877c2f Restore support for the -layers transformation 2018-01-02 07:20:23 -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 95117a2ce2 Convert non-web image (e.g. PSD) variants to PNG 2017-12-18 07:49:24 -05:00
George Claghorn 605484079d Extract metadata from images and videos 2017-10-22 13:16:59 -04:00
George Claghorn d30586211b Preview PDFs and videos 2017-09-28 16:43:37 -04:00
Rafael Mendonça França 9330d01ada Add 'activestorage/' from commit '3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58'
git-subtree-dir: activestorage
git-subtree-mainline: 0d58e7e478
git-subtree-split: 3f4a7218a4
2017-07-31 15:21:22 -04:00