| 
	
 | 
 Posted by Richard Levasseur on 07/27/06 02:05 
bizt wrote: 
> Hi, 
> 
> I have a PHP program on my webspace that I use to upload images. As the 
> images are about 500KB each, I would like to create a preview thumbnail 
> image with smaller image dimensions than the original. 
> 
> Now I dont know a great deal about image manipulation but heres how I 
> would imagine it might be done: 
> 
> 1) The image file would be located on the server from the PHP script 
> (eg. show_image.php - this would be called from the <img> tag 'src' 
> attribute). 
> 2) The image data would be extracted from the image. 
> 3) The image data would be resized 
> 4) The resized image data would be output 
> 
> Im seen something similar. Can this be done simply? 
> 
> Cheers 
> 
> Burnsy 
 
Yes.  You use the GD library that PHP has (usually, sometimes you must 
recompile it in). 
 
Here's a resize script i wrote a long, long time ago.  Its the first 
half of the script: 
http://www.arcanesanctum.com/nextlevel/std/listdir.phps 
 
basically, you open the file, use copyresized, then output it.  Not too 
difficult.  In fact, I think the PHP manual might have an example in 
it, possibly in the comments somewhere.
 
  
Navigation:
[Reply to this message] 
 |