Welcome Guest, Not a member yet? Register   Sign In
Real-time image manipulation and cache using class.upload.php
#11

[eluser]helmutbjorg[/eluser]
Hi... These cached images don't expire (they get intentionally deleted). I'm not saying this is the answer to all of your problems. It is more of a time/work saver and it may only be useful in some situations depending on server loads, frequency of new images, etc. It definitely won't help you if you let your clients upload 4mb images and have 12 to a page. In most cases it is me (the developer) who is the first to visit the page and cop the increased load time.

1. Take this case... you have 22 images on the server. You have converted them all to small jpegs and saved them. The client wants them all to have a watermark. You have to go back and change the existing images. And then you have to edit the code to make any new images have a watermark. My way- you delete the image cache. You change the format in config.
2. Thats a nice idea! Perhaps version 2 can have this as an option too?

Cheers
#12

[eluser]longlostcousin[/eluser]
thanks for the update! is working perfectly now. yeah, it's not a perfect solution to every situation but i can see how it will be handy to have around. thanks again!

mark
#13

[eluser]tyuwan[/eluser]
The only problem i have is to be able to clear all the cache in group.

And how do i use this with imagemagick?
#14

[eluser]helmutbjorg[/eluser]
Just delete the files from the cache folder. Or to delete just one image (in it's various formats) create a function to take the filename and the format and then loop through the formats and delete from the cache directory. Sorry to be rude but if your having trouble 'clearing the cache' then you shouldn't be using this script. I said at the beginning that it isn't for beginners.

What benefits are you looking to achieve with ImageMagick?
#15

[eluser]tyuwan[/eluser]
I can deal with the cache group part. Class.upload is using GD2 how do i change it to imagemagick jw
#16

[eluser]helmutbjorg[/eluser]
Not sure... Check out verot.net
#17

[eluser]Unknown[/eluser]
If I want to use it on simple. How?

$this->Imaging->upload($_FILES['myfiles'])

???
#18

[eluser]quickshiftin[/eluser]
Good stuff!




Theme © iAndrew 2016 - Forum software by © MyBB