RE: [PHP] Needing some Advice

From: Date: Wed, 26 Jun 2002 01:48:30 +0000
Subject: RE: [PHP] Needing some Advice
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103875@lists.php.net to get a copy of this message
> > I am creating a php site that is going to have lots of "user > > uploaded pictures" of houses. I am having a hard time deciding how I > > want to deal with those pictures. My concern is that I would like for > > all the pictures that users upload to be uniform (i.e the same height > > and width). Does anyone here have experiance with resizing pictures to > > fix into a page correctly? Some of the thoughts that I have had are, > > > > 1. Require users to upload a pictues that are within a certin size. > > 2. I have tried using ImageMagick and it seems to work pretty well. > > 3. I think php has some way of resizing images ( does anyone know). > > 4. Have the user upload/send their picture, and I edit them to my > > specs. > I suggest you only allow them to upload the image if it meets your > requirements. If the width is greater than 100 and the height is > greater than 100 give them an error saying "That image is too big. > Images can be no larger than 100x100 pixels." > > That's how I'd do it. You can use getimagesize() to do that and you don't have to use any additional modules or programs, too. www.php.net/getimagesize ---John Holmes...

« previous php.general (#103875) next »