mirror of
https://github.com/Intervention/image.git
synced 2025-09-03 02:42:45 +02:00
minor fixes
This commit is contained in:
@@ -51,7 +51,7 @@ class Image
|
||||
|
||||
/**
|
||||
* Combined filename (basename and extension)
|
||||
* @var [type]
|
||||
* @var string
|
||||
*/
|
||||
public $filename;
|
||||
|
||||
@@ -121,6 +121,7 @@ class Image
|
||||
throw new Exception("Wrong image type ({$this->type}) only use JPG, PNG or GIF images.");
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$this->width = 1;
|
||||
@@ -249,14 +250,11 @@ class Image
|
||||
$grab_width = $this->width;
|
||||
$ratio = $grab_width / $width;
|
||||
|
||||
if($height * $ratio <= $this->height)
|
||||
{
|
||||
if($height * $ratio <= $this->height) {
|
||||
$grab_height = round($height * $ratio);
|
||||
$src_x = 0;
|
||||
$src_y = round(($this->height - $grab_height) / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$grab_height = $this->height;
|
||||
$ratio = $grab_height / $height;
|
||||
$grab_width = round($width * $ratio);
|
||||
|
Reference in New Issue
Block a user