Class EXIFR::TIFF::Orientation
In: lib/exifr/tiff.rb
Parent: Object

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

Methods

Public Instance methods

Debugging output.

[Source]

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

Field value.

[Source]

# File lib/exifr/tiff.rb, line 256
      def to_i
        @value
      end

Rotate and/or flip for proper viewing.

[Source]

# File lib/exifr/tiff.rb, line 266
      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

[Validate]