Module: Asposeimagingjava::DataRecoveryForTiffImages

Defined in:
lib/asposeimagingjava/images/datarecoverytiffimages.rb

Instance Method Summary collapse

Instance Method Details

#initializeObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/asposeimagingjava/images/datarecoverytiffimages.rb', line 3

def initialize()
    data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

    # Create an instance of LoadOptions

    load_options = Rjb::import('com.aspose.imaging.LoadOptions').new

    # Specify the DataRecoveryMode for the object of LoadOptions

    load_options.setDataRecoveryMode(Rjb::import('com.aspose.imaging.DataRecoveryMode').ConsistentRecover)

    # Specify the DataBackgroundColor for the object of LoadOptions

    load_options.setDataBackgroundColor(Rjb::import('java.awt.Color').getRed())

    # Load an existing image

    image = Rjb::import('com.aspose.imaging.Image').load(data_dir + "multipage.tiff", load_options)

    # do some work

end