|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm working on a website in PHP that allows users to upload images to a folder on the server. I was hoping someone could point me in the right direction as to how to create thumbnail images as well as using the thumbnails to display the original image. I'm not even sure where to start on this. I'm hoping someone can give me a link to some good articles on this subject or something like that. Not trying to get anyone to write it for me just looking for a place to start at. Thanks for the help.
|
|
#2
|
|||
|
|||
|
My workaround has been to force a stardard size on the image when it displayed. This is easy but can distort images that are odd sized.
The image can also then have a hyperlink attached that opens a temp page to display the image at full size. This is what you are trying to do? Good luck.
__________________
bow wow! |
|
#3
|
||||
|
||||
|
There's at least one tutorial and probably a couple of threads about this here at this site. Look around for something about "GD" or "photo album." Essentially, if you want to create separate thumbnails to optimize page load and avoid image distortion that would arise from the workaround already mentioned, you'll need to look into using either PHP's image manipulation functions (try http://www.php.net/image_create as a starting point) or ImageMagick's apache module, which can perform image translations on the fly.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#4
|
|||
|
|||
|
a way to do it, without getting the nasty streach-marks on the pictures due to wierd size uploads, id to get the image sice, and then determin the scalin by the ralatyions of the height and width of the picture to create the variables that are the thumbnail-size. This is a rather big piece of work. but pays of.
|
|
#5
|
|||
|
|||
|
<IMG SRC="uploaded photo path" HEIGHT=YY WIDTH=XX>
this one just reduces the size of the image as it is displayed in the page. but this does not reduce the file size i.e 50K will still be 50K though it appears smaller. this is quite a disadvantage with load time. |
|
#6
|
|||
|
|||
|
thats true. But then, you calculate the new thumbnailsizes, and then store a new image, with that size, in a thumbnail folder. then this picture will be bothe smaler in size, and in file-size.
|
|
#7
|
||||
|
||||
|
Quote:
A better solution would be to use a component such as PHP's GD object, or some other component that does on-the-fly image manipulation. I.e. see dhouston's post. |
|
#8
|
|||
|
|||
|
that's how i do it. i guess i need to do some reading. thanks
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Resizing Images |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|