$image = imagecreatefromjpeg('image.jpg'); $height = getImageHeight($image); echo "The height of the image is: " . $height . " pixels.";
$image = imagecreatefrompng('image.png'); $height = getImageHeight($image); echo "The height of the image is: " . $height . " pixels.";
$image = imagecreatefromgif('image.gif'); $height = getImageHeight($image); echo "The height of the image is: " . $height . " pixels.";Package/Library: This function is a part of the GD (Graphics Draw) library, which is included with PHP by default. It is used for creating and manipulating images in various formats.