You are here: Re: Locate an image file on the server, extract data, resize and then output new image - can this be done? « PHP Programming Language « IT news, forums, messages
Re: Locate an image file on the server, extract data, resize and then output new image - can this be done?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация