@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $this->imagePath = $imagePath; |
73 | 73 | $this->imageMime = mime_content_type($this->imagePath); |
74 | 74 | $this->imageInfo = pathinfo($this->imagePath); |
75 | - $this->imageName = hash("crc32", $this->imageInfo['basename']) . date("Ymd") . hash("crc32", |
|
76 | - "{$width}{$height}") . ($this->imageMime == "image/jpeg" ? ".jpg" : ".png"); |
|
75 | + $this->imageName = hash("crc32", $this->imageInfo['basename']).date("Ymd").hash("crc32", |
|
76 | + "{$width}{$height}").($this->imageMime == "image/jpeg" ? ".jpg" : ".png"); |
|
77 | 77 | |
78 | 78 | if (!in_array($this->imageMime, self::$allowedExt)) { |
79 | 79 | return "Not a valid JPG or PNG image"; |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | $src_y = round(($src_h - ($src_h / $cmp_y * $cmp_x))); //2 |
133 | 133 | } |
134 | 134 | |
135 | - $src_x = (int)$src_x; |
|
136 | - $src_h = (int)$src_h; |
|
137 | - $src_y = (int)$src_y; |
|
138 | - $src_y = (int)$src_y; |
|
135 | + $src_x = (int) $src_x; |
|
136 | + $src_h = (int) $src_h; |
|
137 | + $src_y = (int) $src_y; |
|
138 | + $src_y = (int) $src_y; |
|
139 | 139 | |
140 | 140 | if ($this->imageMime == "image/jpeg") { |
141 | 141 | return $this->fromJpg($width, $height, $src_x, $src_y, $src_w, $src_h); |