Results 1 to 1 of 1
Thread: Need a memory cache idea
Jul 14, 2008, 02:01 #1
- Join Date
- Dec 2005
- Cambridge, England
- 82 Post(s)
- 3 Thread(s)
Need a memory cache idea
I am using simple commands like this in Imagemagick to modify an image:
exec("convert input.jpg output.png");
When things get more complicated and you want to use the image more than once I can use:
exec("convert input.jpg -write mpr:image +delete \( mpr:image -thumbnail x480 -write 480_wide.jpg \) \( mpr:image -thumbnail x250 -write 250_wide.jpg \) \( mpr:image -thumbnail x100 -write 100_wide.jpg \) \( mpr:image -thumbnail 64x64! -write 64_square.jpg \) \( mpr:image -colorspace Gray -write black_white.jpg \)");
I would like to modfy an image in one exec( ) then hold it in the memory and call it with a different exec( ) later.
Another way would be to save the image into a variable ?
Another idea: How would I go about using the temp folder as the items are automaticaly deleted from there ? Would this be the way to go althogh it will not be as fast as the images are not already in the memory.