search for in the  
<imagesximagetruecolortopalette>
Last updated: Thu, 19 May 2005

imagesy

(PHP 3, PHP 4, PHP 5)

imagesy -- Get image height

Description

int imagesy ( resource image )

imagesy() returns the height of the image identified by image.

Example 1. Using imagesy()

<?php

// create a 300*200 image
$img = imagecreate(300, 200);

echo
imagesy($img); // 200

?>

See also imagecreate(), getimagesize() and imagesx().



User Contributed Notes
imagesy
BSE_Icheb at hotmail dot com
20-Jun-2003 06:13
You should destroy the $img too...
So it would be :
$img = @imagecreatefromjpeg("http://www.mysite.com/my_image.jpg");

if ($img) {
 $img_height = imagesy($img);
 ImageDestroy($img);
}

echo "My height is " . $img_height;
boo at php dot net
14-Aug-2002 01:01
To use this function notice that 'image' parameter it's a RESOURCE and NOT an Image File Path !

Here comes an exemple:

$img = @imagecreatefromgif("http://www.mysite.com/my_imag.gif");

if ($img) $img_height = imagesy($img);

echo "My height is " . $img_height;

<imagesximagetruecolortopalette>
 Last updated: Thu, 19 May 2005
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: The Server Pages
Last updated: Thu May 19 17:35:34 2005 CDT