Hi,
Arnaud Martin has just created a system which enables to chain several
graphic functions in memory, without any file saving.
Tested on a website with a lot of galleries, his image CACHE has been
reduced from 1.4Go to 51Mo !
For each image, he stored several intermediate PNG files (a png weighs
between 5 and 10 times the weight of the corresponding JPEG). As
example, if he saved 5 files png weighing 6 times the file of origin,
approximately that gaves : 30 times the weight of the original file,
only for intermediate calculations. From now on : We have the original
JPEG, and the result JPEG -- that's all.
The principle is to frame the series of graphic filters by the two
following filters:
- image_lire ($img)
- image_ecrire ($img, $fmt)
($fmt is "jpg", "gif", or "png").
For example:
[(#FICHIER |image_lire
|image_reduire{400}
|image_sepia
|image_rotation{90}
|image_ecrire{jpg} )]
- It is conceived so that, if one doesn't insert image_lire and
image_ecrire, the functions adopt the old method and nothing should be
modified. This point is to be checked, obviously; if there is any
change when the new functions aren't used, it is a bug.
- One thus gains much space on the hard disk.
- computing time is faster, because the number of intermediate files
writings is reduced
- On the other hand, if verrrrry heavy functions are used, the new
method won't work because it doesn't save intermediate stages : so if
the whole operations between image_lire and image_ecrire cannot be
processed before the time_out, then that will _never_ pass.
IMPORTANT :
This method applies only on unique images (on #FICHIER, or #LOGO_xx
for ex.), but not #TEXTE (actually, maybe this will be improved)
More important : this method hasn't been deeply tested yet, and you
need the SVN version of SPIP. At you own risks only 
enjoy !!
.Gilles