Sha256: 0c70c254c2048ed3e5a41f01809db5b4035525e3dcaa1f22992806fad8fd342c

Contents?: true

Size: 701 Bytes

Versions: 1

Compression:

Stored size: 701 Bytes

Contents

module Asposeocrjava
  module SetImageResolution
    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposeocrjava-0.0.1 lib/asposeocrjava/OMR/setimageresolution.rb