Sha256: 2c767bfd93910663093aa8b6a03ec46dec9621ea607073a272ee2f9671930b14
Contents?: true
Size: 640 Bytes
Versions: 12
Compression:
Stored size: 640 Bytes
Contents
require 'RMagick' module Mork # The class MimageList class MimageList def initialize(fname) raise "Initializing a MimageList requires a string" unless fname.class == String if File.extname(fname) == '.pdf' @images = Magick::ImageList.new(fname) { self.density = 200 } else @images = Magick::ImageList.new(fname) end end def shift Mimage.new @images.shift end def [] (i) # puts "I: #{i}" # puts @images[i].inspect Mimage.new @images[i] end def each @images.each do |i| yield Mimage.new i end end end end
Version data entries
12 entries across 12 versions & 1 rubygems