Module: Asposeocrjava::SetImageResolution
- Defined in:
- lib/asposeocrjava/OMR/setimageresolution.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/asposeocrjava/OMR/setimageresolution.rb', line 3 def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Initialize a string with template file location image_file = data_dir + "sample_omr.jpg" # Create an instance of OmrImage class and load the template using the factory method Load image = Rjb::import('com.aspose.omr.OmrImage').load(image_file) # Define new value of image resolution in double format image.setResolution(210.0) # overwrites the old DPI value # Do processing puts "Set image resolution." end |