Thumbnails, loading images and storing them in arrays


#1

Hi, I’m still not very familiar with the JUCE library…
I’m building some thumbnails and I have to load lots of images. I guess that many people will come across the same problem so I decided to post my story.

  • I’d like to be able to read and store “a low quality version of the image” instead of the whole image to avoid overloading the memory. Do you know any quick hack to do that? Does JUCE include anything that could be used? Otherwise I’ll try to add it to the Image JUCE file.

  • What’s wrong with the operator =( in the Image class (juce_image.h) which is never implemented?

Finally I just discovered the ImageCache class, which solves the problem of storing many images but it took me a long time to find it. Maybe a comment in the Image Class would help :slight_smile:

And BTW, I think that it would be nice to create a section in the root forum called “Code Examples”… I think that would be really helpful.


#2

I think the Image::createCopy method is what you’re after there…

Thanks for the other stuff you mention too.


#4