public getAspectRatio ( ) : float | ||
return | float | The aspect ratio of this image, or 0 if no dimensions |
public function getAspectRatio()
{
if ($this->info['height'] > 0) {
return $this->info['width'] / $this->info['height'];
} else {
return 0;
}
}