Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated resizing of image when uploading to site

Status
Not open for further replies.

TheDemon

Programmer
Feb 7, 2000
108
GB
I'm working on a site where a number of different users upload their own scanned images into a template. Each image will sit within a specified size (say 100x300 pixels).<br>
<br>
The problem is that different users will scan in images of varying sizes. <br>
<br>
How can I ensure that quality of scans remain the same? Is there a way of getting them to upload a vector-based file and then automating a conversion to raster? <br>
<br>
Am I on the right lines or totally out of the ball-park?!<br>
<br>
Your help would be very much appreciated as I don't want to have to sit at home until 5 in the morning resizing images manually!<br>
<br>
Thank you.
 
This question would belong better in the PHP, ASP, or Perl forums, as it would involve server-side sripting. I know that PHP works well with a server-side image processing program called GD, which I'm sure could handle image resizing, although I don't know about vector-to-raster conversion.
 
Alternatively; you could just set all of the images to display at the specified size regardles of what its original size was (i.e. <b>&lt;img src=&quot;URL&quot; height=300 width=100&gt;</b>)<br>
<br>
That should work at least temporarily :) <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= > </a><br>*nix installation & program collector/reseller. Contact me if you think you've got one that I don't :)
 
I tend to agree with both of them.<br>
<br>
If you are wanting to stay as far away from server-side scripts as possable, there are two things you can do( In my opinion).<br>
<br>
1) use the &lt;img src=&quot;...&quot; width......&gt;<br>
or <br>
2) ask the user to upload images with a specified width/height, and delete the ones that are not that size.<br>
(but I would not recommend that, as you will probably loose users)<br>
<br>
<br>
theEclipse<br>
robacarp.webjump.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top