这个 imagesy() 函数是PHP中的一个内置函数,用于返回给定图像的高度。
null
语法:
int imagesy( $image )
参数: 此函数接受单个参数 $image 这是强制性的。这个 $image 变量存储ImageCreateTureColor()图像创建函数创建的图像。
返回值: 此函数用于返回图像的高度或错误时返回FALSE。
下面的程序说明了 imagesy() 函数。
项目1:
<?php // store the image in variable. $image = imagecreatefrompng( "gfg.png" ); // Display the height of image. echo imagesy( $image ); ?> |
输出:
184
项目2:
<?php // Create the size of image or blank image. $image = imagecreatetruecolor(500, 300); // Display the height of image. echo imagesy( $image ); ?> |
输出:
300
相关文章:
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END