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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php