Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 30, 2012 08:30 PM by EnenDaveyBoy
Jun 30, 2012 02:48 PM|LINK
Just a quick questions, at present I am building a system where people can upload images, on upload them they specify what the image will be used for and I process the image to process multiple images and store them on the server, and all works well, however
one of the images needs to be a square to fit the requirments, and if someone uploads a rectangle we set the background to white and format a square image.
However in setting the background as white that causes an issue if later we want to allow the user the change their pages background.
So my question is, if i just upload the image and then format all my images on the page, at the time of display, will this impact gratly on my page loading times ?
I am worried about the processing times for images on the fly, should I be?
I should at, that in some cases the original images would be large, (would that make a difference by itself?), so they will have to be resized, and sometimes, backgrounds added, and then optimised for the web, but not much more.
Jun 30, 2012 03:11 PM|LINK
you are doing the correct thing, process the images through seprate process so that do have to wait long to finish the task.
The problem you have mentioned here, you can solve it by applying transparent background. So, its upto the use what backgroud color he want to use or he may want to keep the transparent background.
Jun 30, 2012 04:28 PM|LINK
I agree that you should use a transparent background if possible.
CPU-intensive code will always cost you money and impact performance. If you are unsure about how to process the image, why not process it on the fly and then store it as a temporary file. Next time you need the image, look for the temporary file first.
In future, if you need to change the image in any way, just delete the temporary files and process them again when they are accessed.
Usually, it is not a problem to process a image in a page as long as you only do it once.
Jun 30, 2012 08:30 PM|LINK
the images in question are mainly jpg' so the background cannot be transparent, but the temp folder id is excellent will do that.
Thanks for the help