Class: Utopia::Tags::Gallery::Processes::DocumentThumbnail

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

Instance Method Summary collapse

Methods inherited from Thumbnail

#initialize

Constructor Details

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

Instance Method Details

#call(img) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/utopia/tags/gallery.rb', line 46

def call(img)
	img = super(img)

	shadow = img.dup

	shadow = shadow.colorize(1, 1, 1, 'gray50')
	shadow.background_color = 'transparent'
	shadow.border!(10, 10, 'transparent')

	shadow = shadow.gaussian_blur_channel(5, 5, Magick::AlphaChannel)

	shadow.composite(img, 5, 5, Magick::OverCompositeOp)
end

#default_extension(path) ⇒ Object



60
61
62
# File 'lib/utopia/tags/gallery.rb', line 60

def default_extension(path)
	return "png"
end