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

search for in the

imagetruecolortopalette> <imagesx
Last updated: Fri, 20 May 2011

view this page in

imagesy

(PHP 4, PHP 5)

imagesyObtener el alto de una imagen

Descripción

int imagesy ( resource $image )

Devuelve el alto del recurso de imagen image dado.

Parámetros

image

Un recurso image, es devuelto por una de las funciones de creación de imágenes, como imagecreatetruecolor().

Valores devueltos

Devuelve el alto de image o FALSE si se produjeron errores.

Ejemplos

Example #1 Usar imagesy()

<?php

// crear una imagen de 300*200
$img imagecreatetruecolor(300200);

echo 
imagesy($img); // 200

?>

Ver también



add a note add a note User Contributed Notes imagesy
BSE_Icheb at hotmail dot com 20-Jun-2003 11: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 06: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;

 
show source | credits | stats | sitemap | contact | advertising | mirror sites