I have a Rails app that uploads images for image processing, and I want to be able to 1) See how many pages/frames/scenes there are in an image, and 2) split multi-page images into single-page jpegs.
I'm having no trouble converting image types for single-scene images, but I can't quite puncture the ImageMagick documentation to understand exactly what I'm to do. The doc page I'm using is here:
http://www.imagemagick.org/www/escape.html
For the most part, I would like the code to be as simple as
def multiPage?( image )
img = MiniMagick::Image.open(image.path)
numPages = img.format("%n") #This returns Nil
count > 1 ? true : false
end
Does anyone have a better idea of what to do than I do? Thanks in advance!