Class: Halation::ExifToolImage
- Inherits:
-
Object
- Object
- Halation::ExifToolImage
- Defined in:
- lib/halation/tools/exif_tool/image.rb
Overview
Image interface implementation for ExifTool. Available as apt package ‘libimage-exiftool-perl`.
Instance Method Summary collapse
-
#[](tag) ⇒ Object
Read an Exif tag.
-
#[]=(tag, value) ⇒ Object
Write an Exif tag.
-
#initialize(file_path) ⇒ ExifToolImage
constructor
A new instance of ExifToolImage.
-
#save ⇒ Object
Save the Exif data to the image file.
Constructor Details
#initialize(file_path) ⇒ ExifToolImage
Returns a new instance of ExifToolImage.
10 11 12 |
# File 'lib/halation/tools/exif_tool/image.rb', line 10 def initialize(file_path) @image = MiniExiftool.new(file_path, numerical: true) end |
Instance Method Details
#[](tag) ⇒ Object
Read an Exif tag.
16 17 18 |
# File 'lib/halation/tools/exif_tool/image.rb', line 16 def [](tag) @image[tag] end |
#[]=(tag, value) ⇒ Object
Write an Exif tag.
23 24 25 |
# File 'lib/halation/tools/exif_tool/image.rb', line 23 def []=(tag, value) @image[tag] = value end |
#save ⇒ Object
Save the Exif data to the image file.
28 29 30 |
# File 'lib/halation/tools/exif_tool/image.rb', line 28 def save @image.save end |