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.
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.
If this post answered your question or solved your problem, please Mark it as Answer.
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.
Marked as answer by enendaveyboy on Jun 30, 2012 08:29 PM
EnenDaveyBoy
Participant
1465 Points
1146 Posts
Image Processing time question
Jun 30, 2012 02:48 PM|LINK
Hi
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.
Ramesh Chand...
Star
12922 Points
2672 Posts
Re: Image Processing time question
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.
rickevry
Member
386 Points
88 Posts
Re: Image Processing time question
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.
EnenDaveyBoy
Participant
1465 Points
1146 Posts
Re: Image Processing time question
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