module GPhoto2::Camera::Capture
  
  Direct including types
Defined in:
gphoto2/camera/capture.crInstance Method Summary
- 
        #capture : CameraFile
        
          
 - 
        #preview : CameraFile
        
          
Captures a preview from the camera.
 - 
        #trigger : Nil
        
          
Triggers a capture and immediately returns.
 
Instance Method Detail
        
        def capture : CameraFile
        #
      
      
        # Take a photo.
file = camera.capture
# And save it to the current working directory.
file.save
        
        
        def preview : CameraFile
        #
      
      
        Captures a preview from the camera.
Previews are not stored on the camera but are returned as data in a
GPhoto2::CameraFile.
# Capturing a preview is like using `Camera#capture`.
file = camera.preview
# The resulting file will have neither a folder nor name.
file.preview? # => true
# But it will contain image data from the camera.
file.data # => "\xFF\xD8\xFF\xDB\x00\x84\x00\x06..."
        
        
        def trigger : Nil
        #
      
      
        Triggers a capture and immediately returns.
A camera trigger is the first half of a #capture. Instead of
returning a GPhoto2::CameraFile, a trigger immediately returns and
the caller has to poll for events.
camera.trigger
event = camera.wait_for(:file_added)
event.data # => CameraFile