Sha256: 21921ed80f8d982e9b2fa48fc627e657e5b7ff6a56e3a075856f73029c2a7e92
Contents?: true
Size: 749 Bytes
Versions: 2
Compression:
Stored size: 749 Bytes
Contents
module Asposeslidesjava module ShapeThumbnail def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/Shapes/' # Create an instance of Presentation class pres = Rjb::import('com.aspose.slides.Presentation').new(data_dir + 'demo.pptx') # Create a full scale image image = pres.getSlides().get_Item(0).getShapes().get_Item(0).getThumbnail() # Save the image to disk in PNG format 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 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asposeslidesjava-0.0.2 | lib/asposeslidesjava/Shapes/shapethumbnail.rb |
asposeslidesjava-0.0.1 | lib/asposeslidesjava/Shapes/shapethumbnail.rb |