PHP: imagesy - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

imagetruecolortopalette imagesx

Last updated: Sat, 27 Jan 2007

view this page in

# imagesy

(PHP 3, PHP 4, PHP 5)

imagesy -- Get image height

## Описание

int imagesy ( resource image )

Returns the height of the given `image` resource.

## Список параметров

`image`

  An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().

## Возвращаемые значения

Return the height of the `image` or `FALSE` on errors.

## Примеры

Пример 1. Using imagesy()

`<?php // create a 300*200 image $img = imagecreatetruecolor(300, 200); echo imagesy($img); // 200 ?>`

## Смотрите также

imagecreatetruecolor()
getimagesize()
imagesx()

add a note User Contributed Notes
imagesy
BSE_Icheb at hotmail dot com
20-Jun-2003 04: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
13-Aug-2002 11: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;`
add a note
imagetruecolortopalette imagesx

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST