mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 05:56:22 +05:30
Update dispatch.php
This commit is contained in:
parent
ddda1ddb57
commit
efa0b07e91
1 changed files with 3 additions and 3 deletions
|
|
@ -669,9 +669,9 @@ function create_thumb($src, $desired_width = null, $desired_height = null) {
|
|||
}
|
||||
|
||||
$ratio = max($desired_width/$width, $desired_height/$height);
|
||||
$height = $desired_height / $ratio;
|
||||
$x = ($width - $desired_width / $ratio) / 2;
|
||||
$width = $desired_width / $ratio;
|
||||
$height = floor($desired_height / $ratio);
|
||||
$x = floor(($width - $desired_width / $ratio) / 2);
|
||||
$width = floor($desired_width / $ratio);
|
||||
|
||||
/* create a new, "virtual" image */
|
||||
$virtual_image = imagecreatetruecolor($desired_width, $desired_height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue