Sha256: 1da53f432d810bd70b2dec6ad2cfc64043af62eb568ab49b3176e27d6a80404b
Contents?: true
Size: 665 Bytes
Versions: 7
Compression:
Stored size: 665 Bytes
Contents
# require 'RMagick' module Mork # @private # The class MimageList, currently abandoned 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
7 entries across 7 versions & 1 rubygems