Re: Image size, (not weight) help

From: Date: Sun, 30 Mar 2003 04:34:24 +0000
Subject: Re: Image size, (not weight) help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141585@lists.php.net to get a copy of this message
here is something for you from php manual The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP or IFF image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag. Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a flag indicating the type of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF. These values correspond to the IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag. Friendship is always a sweet responsibility, never an opportunity. HaSeEb IqBaL. 0300-4258030

« previous php.general (#141585) next »