|
|
@@ -1,4 +1,3 @@
|
|
|
-require 'image_science'
|
|
|
module Fotos
|
|
|
class Thumbnail
|
|
|
WIDTH = 250
|
|
|
@@ -10,11 +9,8 @@ module Fotos
|
|
|
def create(destination_path = ".")
|
|
|
target_path = @asset.thumbnail_path(destination_path)
|
|
|
return target_path if File.exist?(target_path)
|
|
|
- ImageScience.with_image(@asset.file_path) do |img|
|
|
|
- img.thumbnail(WIDTH) do |thumb|
|
|
|
- thumb.save(target_path)
|
|
|
- end
|
|
|
- end
|
|
|
+ th_image = Vips::Image.thumbnail(@asset.file_path, WIDTH)
|
|
|
+ th_image.write_to_file(target_path)
|
|
|
target_path
|
|
|
end
|
|
|
end
|