Return to Snippet

Revision: 2646
at March 19, 2007 14:06 by gtcaz


Initial Code
height_width = ""
image_info_cmd = ENV['TM_BUNDLE_SUPPORT'] + "/bin/ImageInfo"
image_winfile = %x{cygpath -w "#{full_path}"}.chomp
width, height = %x{"#{image_info_cmd}" "#{image_winfile}" }.split[2, 3]
if height && width
  height_width = %Q{ height="#{height}" width="#{width}"}
end
print %Q{<img src="#{url}" alt="${1:#{CGI::escapeHTML alt}}"#{height_width}#{ENV['TM_XHTML']}>}

Initial URL


Initial Description


Initial Title
Image info from blogging.rb

Initial Tags
ruby

Initial Language
Ruby