views:

32

answers:

1

Hi;

I'v design a db for magazine online,foe each article i will have 3 photos in different size ,first i select one photo and then must make another 2 photos with resizing,if i want that handel this by hand it is very difficult,what is your suggestion?i use mysql+php and is there any cms in this regard?

thanks

A: 

Use ImageMagick on the server to create the other two images.

Lou Franco
it is years that i use firework ,do you think that ImageMagick is better and more simple?
Kaveh
yes , i read on php.net as my underestanding it doesn't need that i do manually and for other images i resize with php.
Kaveh
With imagemagick, you just need to call `convert in.jpg -resize 400x400 out.jpg` and it's done. You can control the type of resizing if you want. I have never used firework, but imagemagick is very simple. More info: http://www.imagemagick.org/Usage/resize/
Lou Franco
There is a question for me,i have a main in.jpg in its folder and want to resize it in several points on my site and i call "convert in.jpg -resize 400x400 out.jpg" so these out.jpg save on my site? or a copy of in.jpg resize and send to user that request that page?
Kaveh
When you call convert on the server, the output jpeg will be on the server, but you could copy it to a folder in your webroot and then put an img tag in the page that uses it.
Lou Franco
"output jpeg will be on the server" does it mean that with each request of a page by a user one copy creat? or each copy goes to a temp folder and after a while will be kill?
Kaveh
It's up to you and how you code it. You could check to see if the result file exists and skip it. Probably the best thing to do is to create the 2 other images right after the original is uploaded -- then they are already there when the request comes in.
Lou Franco