(I apologize for the length of this post in advance.)
Okay, some further reading reveals that, yes, ImageMagick does decompress JPEGs in memory. This is necessary as image manipulation requires the raw image data. Quality is what is irreversible.
You did not read my links on images in memory. Let me pull the most relevant part here:
Quote:The amount of memory (in bytes) required to store a single image in memory may be calculated via the equation (QuantumDepth*Rows*Columns*5)/8. Performing an image processing operation may require that several images be in memory at one time. In the case of animations, hundreds of images may be in memory at one time.
Image processing necessarily uses a great deal of memory no matter how you go about it. This is why machines dedicated to high resolution image generation/manipulation are typically loaded with RAM. You simply can't expect the same performance from an outdated machine; it is ill-equipped for image processing. I'm not sure what the complaint is here.
The idea behind on-the-fly caching is that it is used only when needed. If the cached image exists, that will be used, and the cached image only needs to be generated once. Your use case is what the precacher is for. What happens for the user who isn't the sole provider of his site's content? What if someone who is not technologically savvy is meant to upload images? His images will not appear until they are explicitly precached. This is not an optimal use case. For your usage, on-the-fly caching IS failing gracefully. It's not that the content doesn't exist, it's that it hasn't been generated in the correct form yet.
Quote:they would then somehow be massively turned off by a very expected and appropriate error, the same error response that most every web server in the world would give when content does not exist
Your idea that throwing an error in this case seems strange to me. Very few sites serve solely static content these days. The majority of it is dynamically-generated. And yes, it is extremely off-putting to a user when a piece of software that is meant to display images does not display an image.
In the end, if you get a solution working, feel free to post it and we can discuss specifics at that point. Until then, we are just arguing in circles. Everything said above is my own personal opinion and the devs may disagree. I will be interested to see what comes of this.
Quote:IF that was really true you would be the worst programmers in the world. But it is not true, as I knew, and as I have now proven.
Please refrain from ad hominem attacks. Let's keep the discussion civil. Thanks.
I have never said it is impossible to change Zenphoto's architecture. What I'm saying is that, since Zenphoto's inception, this has been a distinguishing feature compared to other gallery software and our paradigm seems to work quite well for many users. If a solution to your problem is implemented, it will need to cater to both sides of the fence.
Personally, I feel that the ideal solution can be reached by reducing the size of your uploaded photos and/or creating a sequenced precacher. Yet again, just my opinion.
As one last aside, the mechanism we're talking about involves processes, not threads. They are quite different.