Class: Utopia::Tags::Gallery::Processes::CropThumbnail

Inherits:
Thumbnail
  • Object
show all
Defined in:
lib/utopia/tags/gallery/thumbnail.rb

Overview

Resize the image to fit within the specified dimensions while retaining the aspect ratio of the original image. If necessary, crop the image in the larger dimension.

Direct Known Subclasses

CircularCropThumbnail

Instance Method Summary collapse

Methods inherited from Thumbnail

#default_extension, #initialize

Constructor Details

This class inherits a constructor from Utopia::Tags::Gallery::Processes::Thumbnail

Instance Method Details

#call(img) ⇒ Object



55
56
57
# File 'lib/utopia/tags/gallery/thumbnail.rb', line 55

def call(img)
	img.resize_to_fill(*@size)
end