Class: ImageViewer
- Inherits:
-
Object
- Object
- ImageViewer
- Defined in:
- lib/focusinspector/ImageViewer.rb
Overview
Focus Inspector - The focus inspection and lens calibration software.
Copyright © 2012 by Chris Schlaeger <[email protected]>
This program is Open Source software; you can redistribute it and/or modify it under the terms of MIT license as shipped with this software.
Instance Method Summary collapse
-
#initialize(image, viewer) ⇒ ImageViewer
constructor
A new instance of ImageViewer.
Constructor Details
#initialize(image, viewer) ⇒ ImageViewer
Returns a new instance of ImageViewer.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/focusinspector/ImageViewer.rb', line 13 def initialize(image, viewer) # Write the marked version of the original image to a temporary file. file = Tempfile.new('lenstuner') image.write('jpeg:' + file.path) file.close # Start viewer to display the marked image. command = "#{viewer} #{file.path} 2> /dev/null" unless system(command) Log.error("Cannot execute '#{command}'") end end |