gems: drop ruby-imagespec gem.
* Use libvips instead of ruby-imagespec for reading dimensions of jpeg, png, and gif files. * Copy the code for reading the dimensions of flash files from ruby-imagespec. Fixes an incompatibility between ruby-imagespec and the rubocop gem that prevented us from including rubocop in the Gemfile.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
class MediaFile::Image < MediaFile
|
||||
def dimensions
|
||||
image_size = ImageSpec.new(file.path)
|
||||
[image_size.width, image_size.height]
|
||||
image.size
|
||||
end
|
||||
|
||||
def image
|
||||
@image ||= Vips::Image.new_from_file(file.path)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user