class EXIFR::TIFF::Orientation

The orientation of the image with respect to the rows and columns.

Public Instance Methods

inspect() click to toggle source

Debugging output.

# File lib/exifr/tiff.rb, line 279
def inspect
  "\#<EXIFR::TIFF::Orientation:#{@type}(#{@value})>"
end
to_i() click to toggle source

Field value.

# File lib/exifr/tiff.rb, line 269
def to_i
  @value
end
to_sym() click to toggle source

Symbolic value.

# File lib/exifr/tiff.rb, line 274
def to_sym
  @type
end
transform_rmagick(img) click to toggle source

Rotate and/or flip for proper viewing.

# File lib/exifr/tiff.rb, line 284
def transform_rmagick(img)
  case @type
  when :TopRight    ; img.flop
  when :BottomRight ; img.rotate(180)
  when :BottomLeft  ; img.flip
  when :LeftTop     ; img.rotate(90).flop
  when :RightTop    ; img.rotate(90)
  when :RightBottom ; img.rotate(270).flop
  when :LeftBottom  ; img.rotate(270)
  else
    img
  end
end