Re: php+gd imagejpeg()
- From: Sebastian Scherhans <seb@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 May 2005 23:16:11 +0200
Am Fri, 20 May 2005 11:38:21 +0200 schrieb Andreas Müller:
> hi @all,
>
> i'm trying to use gd to create thumbnails automatically.
> resizing works fine drawing with imagejpeg as well, but here's also
> my problem. is it right that imagejpeg can only draw one image per site?
> I have a function thumbnail which should draw the image. in my main
> program i call this function within a while loop with different
> parameters(the files). the function draws one image and doesn't return,
> i guess because of the imagejpeg. is it possible to store the images in
> an array and print them out using something like echo "<img src..."?
hi,
it seems like you want to stream those images on-the-fly. you should
create a new file lile thumb.php which loads and resizes the picture
and puts the result out. then you can include this file pretty easy
into your img-tag like <img src="thump.php?picture=1234.jpg">
but have to change the header of that file into "image/jpeg", so that
the browser recognizes the incoming data.
sebastian
.
- References:
- php+gd imagejpeg()
- From: Andreas Müller
- php+gd imagejpeg()
- Prev by Date: Re: PHP File Protection
- Next by Date: Safe way to escape form variables to insert in sql (to oracle)
- Previous by thread: php+gd imagejpeg()
- Next by thread: Session Security
- Index(es):