Hello, everyone!
I am currently attempting to stitch together many images into one large image. Because of the 32-bit restrictions, I can not allocate enough memory to hold the entire image.
A coworker pointed me to the ImageMagick library, because "ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes."
My question is, is it possible to stitch together a couple hundred images that I can not do manually because of the 32-bit limit?
I've looked through the API, and I could not come to a clear answer.
It looks like I would have to generate my background image, and then use the composite function to stitch all of the images onto it.
Stitching together a large image with Magick++
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Stitching together a large image with Magick++
What "32-bit restrictions"? If your computer has a 2^32 limit on filesizes, IM won't overcome that.
IM can create and process images that are too large to fit in memory. However, there is a big performance penalty because disk is much slower than memory.
IM can create and process images that are too large to fit in memory. However, there is a big performance penalty because disk is much slower than memory.
snibgo's IM pages: im.snibgo.com
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Stitching together a large image with Magick++
Compositing onto a background is one way to approach that, but there are other, often more effective ways to attach images to each other with ImageMagick, aligned side by side horizontally or vertically, with specific overlaps or offsets or spacing, just about any way you can imagine.Acorn wrote:It looks like I would have to generate my background image, and then use the composite function to stitch all of the images onto it.
Re: Stitching together a large image with Magick++
Yes, that is what I was alluding to. I know that there will be a performance hit, but I don't really have a choice at this point. I can't do 64-bit, so I'm stuck with 32-bit. If they want these obscenely large images mosaicked together, then I'm going to have to operate off of disk.snibgo wrote:What "32-bit restrictions"? If your computer has a 2^32 limit on filesizes, IM won't overcome that.
IM can create and process images that are too large to fit in memory. However, there is a big performance penalty because disk is much slower than memory.
Could you point me in the right direction w/r/t the C function I should look at?
Am I able to do this off of disk rather than in-memory?GeeMack wrote:Compositing onto a background is one way to approach that, but there are other, often more effective ways to attach images to each other with ImageMagick, aligned side by side horizontally or vertically, with specific overlaps or offsets or spacing, just about any way you can imagine.Acorn wrote:It looks like I would have to generate my background image, and then use the composite function to stitch all of the images onto it.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Stitching together a large image with Magick++
To do what? There are C functions that correspond to most command-line options. For example, "-append" at the command line uses image.c function AppendImages().Could you point me in the right direction w/r/t the C function I should look at?
Sometimes, a C program gives far better performance than a complex script because it can save on filesystem reads and writes. But for simple appends or composites from a number of inputs, there is probably no benefit.
snibgo's IM pages: im.snibgo.com