How to read a portion of an image using RMagick/ImageMagick?
Posted: 2011-02-18T20:02:51-07:00
I'm trying to load a large image and crop it into tiles really fast and with low memory consumption. An example is the way gdal2tiles script http://www.maptiler.org/ does it, but gdal2tiles doesn't output the tiles the way I want them to be. Therefore I decided to develop my own version using ruby and RMagick(Imagemagick).(gdal2tiles barely uses any memory).
What I notice when using RMgick is that I need to load the whole image to memory first which kinda kills my system. Is there a way to read a portion of a image file manipulate it and then read the rest ?? Or maybe I should do it in some other way or use other libraries.
What I notice when using RMgick is that I need to load the whole image to memory first which kinda kills my system. Is there a way to read a portion of a image file manipulate it and then read the rest ?? Or maybe I should do it in some other way or use other libraries.