CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2009
    Posts
    5

    how to combine large number of images using imagemagick with 500MB of RAM

    I need to combine large number of images. I found that, I should use imagemagick, but there are some problems. The site of this software said that, imagemagick could work on huge size images like giga and tra bytes images. In 32bit windows the address space of each process is utmost 3 giga bytes. Then supposing a 4 giga bytes image, the imagemagick should not able to work on it.
    Then imagemagick work on hard disk, instead of RAM, on so large images (if I mistake please tell me). Using this thought I decide to use montage command of imagemagick to combine my images in one big image, but when running the following command a low virtual memory error occurs and operation fail. My RAM are 500MB and I try to combine about 3000 or higher number of images using follwing command.

    >montage -limit memory 300 -limit map 200 -concatenate -tile 100x30 test*.jpg output.jpg

    please help me to know how imagemagick can work on tra-bytes images, or if you know another way or tool to doing such work, tell me.

  2. #2
    Join Date
    Apr 2009
    Posts
    598

    Re: how to combine large number of images using imagemagick with 500MB of RAM

    The size of the virtual memory is a parameter of Windows. It can be increased via the control panel.

  3. #3
    Join Date
    Dec 2009
    Posts
    5

    Re: how to combine large number of images using imagemagick with 500MB of RAM

    thanks for your reply, but I don't speack about virtual memory. in 32bit windows each application address space is utmost 3GiB and this is not relate to size of RAM or virtual memory. even if you have 8GiB RAM, your process could address just 3GiB of that spaces.

  4. #4
    Join Date
    Apr 2009
    Posts
    598

    Re: how to combine large number of images using imagemagick with 500MB of RAM

    1. You don't say, and therefore I don't know, if the settings for your virtual memory is close to 3GB or is very far from that limit. For instance, on my PC, I have a maximum size of only 1600MB for the swap file. But I can increase that size if I have a low virtual memory error. Maybe the same solution will be good enough for you.

    2. Maybe Imagemagick has its own memory management, that is able to address more than 4GB on 32-bit systems.

    3. The limit of 3GB or 4GB for 32-bit systems, is per process. But you can build an application using more than one process. This is not easy to do, but maybe this is what was done by Imagemagick, I don't know.

    RAM is a limited resource, whereas virtual memory is, for most practical purposes, unlimited. There can be a large number of processes each with its own 2 GB of private virtual address space. When the memory in use by all the existing processes exceeds the amount of RAM available, the operating system will move pages (4 KB pieces) of one or more virtual address spaces to the computer’s hard disk, thus freeing that RAM frame for other uses.
    (source: http://support.microsoft.com/kb/555223)
    While 32 bit programs will continue to be limited to the 4 GiB they're capable of addressing, because they each exist in their own virtual address space, a group of programs can together grow beyond this limit and into any available swap space.
    (source: http://en.wikipedia.org/wiki/Paging#...2_bit_Hardware)

  5. #5
    Join Date
    Dec 2009
    Posts
    5

    Re: how to combine large number of images using imagemagick with 500MB of RAM

    Quote Originally Posted by olivthill2 View Post
    1. You don't say, and therefore I don't know, if the settings for your virtual memory is close to 3GB or is very far from that limit. For instance, on my PC, I have a maximum size of only 1600MB for the swap file. But I can increase that size if I have a low virtual memory error. Maybe the same solution will be good enough for you.

    2. Maybe Imagemagick has its own memory management, that is able to address more than 4GB on 32-bit systems.

    3. The limit of 3GB or 4GB for 32-bit systems, is per process. But you can build an application using more than one process. This is not easy to do, but maybe this is what was done by Imagemagick, I don't know.
    you right, but I really need to combine huge number of pictures and ImageMagick fail in middle of work and I don't know the reason. And now I ask about a way that can help me about combining of my pictures.

  6. #6
    Join Date
    Feb 2002
    Posts
    4,640

    Re: how to combine large number of images using imagemagick with 500MB of RAM

    I'm not familiar with Imagemagick, but if it is failing because of memory limitations, how are you going to display/manipulate the resulting image if it's too big?

    Viggy

  7. #7
    Join Date
    Dec 2009
    Posts
    5

    Re: how to combine large number of images using imagemagick with 500MB of RAM

    My university project is about traveling sells person using deluge algorithm on a big city. I downloaded the pictures of that city from "google map" and I should now combine all images to gather. This is first and important stage of my project.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured