class Halation::ExifToolImage

Image interface implementation for ExifTool. Available as apt package `libimage-exiftool-perl`. @see www.sno.phy.queensu.ca/~phil/exiftool/

Public Class Methods

new(file_path) click to toggle source

@param file_path [String] Path to the image file.

# File lib/halation/tools/exif_tool/image.rb, line 10
def initialize(file_path)
  @image = MiniExiftool.new(file_path, numerical: true)
end

Public Instance Methods

[](tag) click to toggle source

Read an Exif tag. @param tag [String, Symbol]

# File lib/halation/tools/exif_tool/image.rb, line 16
def [](tag)
  @image[tag]
end
[]=(tag, value) click to toggle source

Write an Exif tag. @param tag [String, Symbol] @param value [String]

# File lib/halation/tools/exif_tool/image.rb, line 23
def []=(tag, value)
  @image[tag] = value
end
save() click to toggle source

Save the Exif data to the image file.

# File lib/halation/tools/exif_tool/image.rb, line 28
def save
  @image.save
end