Hey guys,
I am pretty new to IM ... I use Core functions to save buffered images to files, depending on the number of images the saving gets really slow (means < 1 MB/s). I tried two different approches:
a) creating Images and saving them via WriteFile() - gets slow at ~750 images
b) creating an Image list and saving it via WriteFiles() - the list creation almost stops at ~1200 images
All images are ~640x480 pixels, 8 bit grayscale, I guess its a memory issue, although I shouldn't touch the bounds currently. Is there a better way to save many images? Can I somehow influence the amount of allocated memory of the image list?
Any help is appreciated.
Regards, Oliver
Saving many images to files gets slow
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Saving many images to files gets slow
Do you need to have so many images in memory at the same time.
Prehaps reading processing writing then deleting them from memory would work better.
If you use too much memory the comuter will run out and start using disk space for memory management, when is VERY VERY slow by comparision. This is known as thrashing!
Prehaps reading processing writing then deleting them from memory would work better.
If you use too much memory the comuter will run out and start using disk space for memory management, when is VERY VERY slow by comparision. This is known as thrashing!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Saving many images to files gets slow
Hi Anthony, thanks for the reply.
Oliver
Yes, since they are grabbed from a camera at 200 fps.anthony wrote:Do you need to have so many images in memory at the same time.
I already tried that, freeing the buffer memory as soon as an image is written to a file. Doesn't make a difference, there is still physical memory available in any case.anthony wrote:Prehaps reading processing writing then deleting them from memory would work better.
I now write the images directly using Windows file operations and the GDI+ definitions. It works quite well, even with >5000 images. I still would be interested if there would be a way to do it with Magick Core functions.anthony wrote:If you use too much memory the comuter will run out and start using disk space for memory management, when is VERY VERY slow by comparision. This is known as thrashing!
Oliver