# File lib/mini_magick/image/info.rb, line 85
      def exif
        @info["exif"] ||= (
          hash = {}
          output = self["%[EXIF:*]"]

          output.each_line do |line|
            line = line.chomp("\n")

            case MiniMagick.cli
            when :imagemagick, :imagemagick7
              if match = line.match(/^exif:/)
                key, value = match.post_match.split("=", 2)
                value = decode_comma_separated_ascii_characters(value) if ASCII_ENCODED_EXIF_KEYS.include?(key)
                hash[key] = value
              else
                hash[hash.keys.last] << "\n#{line}"
              end
            when :graphicsmagick
              next if line == "unknown"
              key, value = line.split("=", 2)
              value.gsub!("\\012", "\n") # convert "\012" characters to newlines
              hash[key] = value
            end
          end

          hash
        )
      end