3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/asposeslidesjava/Shapes/shapethumbnail.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/Shapes/'
pres = Rjb::import('com.aspose.slides.Presentation').new(data_dir + 'demo.pptx')
image = pres.getSlides().get_Item(0).getShapes().get_Item(0).getThumbnail()
Rjb::import('javax.imageio.ImageIO').write(image,"jpeg",Rjb::import('java.io.File').new(data_dir + "ShapeThumbnail.jpg"))
puts "Generated shape Thumbnail from a slide, please check the output file."
end
|