Sha256: 2310d780a1dfaa188ba0f0e9cf4a5d3e7517eff5c638e7246bafb9580bf22204
Contents?: true
Size: 281 Bytes
Versions: 5
Compression:
Stored size: 281 Bytes
Contents
require 'tempfile' require 'jpeg.so' class Jpeg def self.open_buffer(str) tmp = Tempfile::new("ruby-jpeg") tmp.set_encoding Encoding::BINARY if tmp.respond_to?(:set_encoding) tmp.puts str tmp.rewind jpeg = Jpeg.open(tmp.path) tmp.close jpeg end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
jpeg-0.2.2 | lib/jpeg.rb |
jpeg-0.2.1 | lib/jpeg.rb |
jpeg-0.2.0 | lib/jpeg.rb |
jpeg-0.1.4 | lib/jpeg.rb |
jpeg-0.1.3 | lib/jpeg.rb |