Re: Re: image size?

From: Date: Tue, 14 Sep 2004 02:55:59 +0000
Subject: Re: Re: image size?
Groups: php.general 
Request: Send a blank email to php-general+get-196586@lists.php.net to get a copy of this message
Let me explain more fully: I call a script like this: <img src="image.php?file=file_name_here.jpg"> The script figures out if the image named in $_GET['file'] is portrait or landscape, and creates a thumbnail of the same orientation. I would like to get the x and y values of the image out of this script somehow, so that I can specify the height and width attributes. However, calling imagecreatefromjpeg("image.php?file=file_name_here.jpg"> returns an error that it can't open the stream. The browser displays the thumbnail fine, but I can't figure out a way to read off the size of the image. Any thoughts? Ed Lazor wrote:
I think you'll have to use the imagex and imagey functions to get the dimensions of the thumbnail in order to calculate the size.
-----Original Message----- What if the values for x and y are not known? I have a function that returns a thumbnail of a larger image; it calculates the size of the created image based on the dimensions of the original. Paul Birnstihl wrote:
Ed Lazor wrote:
     
Is there a way to get the size of an image created using the
       
imagecreate
function?
       
I'm guessing it would be xsize x ysize x colour depth = size in bits ?
     
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#196586) next »