tarcieri (owner)

Revisions

gist: 227498 Download_button fork
public
Public Clone URL: git://gist.github.com/227498.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  # Monkeypatch ImageVoodoo's save method, since it's broken
  class ImageVoodoo
    class << self
      alias_method :with_image_from_memory, :with_bytes
    end
    
    def save(file)
      format = File.extname(file)
      return false if format == ""
      format = format[1..-1].downcase
      guard { save_impl(format, JFile.new(file.to_java_string)) }
      true
    end
  end