module Iterm::Imgcat
Constants
- VERSION
Public Instance Methods
get_and_print_image(url: nil, width: "auto", height: "auto")
click to toggle source
# File lib/iterm/imgcat.rb, line 7 def get_and_print_image(url: nil, width: "auto", height: "auto") image_binary = open(url).read encoded_image = Base64.encode64(image_binary) puts "\x1B]1337;File=inline=1;width=#{width};height=#{height}:#{encoded_image}\x07" end