Sha256: 95908f04471069c6ee36d5832a12584e95b74fecce853f8fc943f34fe5ce183b

Contents?: true

Size: 595 Bytes

Versions: 1

Compression:

Stored size: 595 Bytes

Contents

module Asposeocrjava
  module LoadImageFromUrl
    def initialize()        
        # Initialize an instance of OcrEngine
        ocr_engine = Rjb::import('com.aspose.ocr.OcrEngine').new

        # Set the Image property by loading the image from remote location
        ocr_engine.setImage(Rjb::import('com.aspose.ocr.ImageStream').fromUrl("http://cdn.aspose.com/tmp/ocr-sample.bmp"))

        # Process the image
        if ocr_engine.process()
            # Display the recognized text
            puts "Text: " + ocr_engine.getText().to_string
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposeocrjava-0.0.1 lib/asposeocrjava/OCR/loadimagefromurl.rb