fix resize image
This commit is contained in:
@@ -292,7 +292,7 @@ class Databap extends PhpObject
|
||||
const REBOOT_DELAY = 15; //seconds
|
||||
const PM_SEP = '___';
|
||||
const CHAT_IMG_MAX_WIDTH = 700;
|
||||
const CHAT_IMG_MAX_HEIGHT = 10000;
|
||||
const CHAT_IMG_MAX_HEIGHT = 2000;
|
||||
const JSON_PREFIX = '[\-JSON-/]';
|
||||
|
||||
//Options Constants
|
||||
@@ -4384,7 +4384,9 @@ class ToolBox
|
||||
list($iWidth, $iHeight) = getimagesize($sInPath);
|
||||
if($iWidth > $iMaxWidth || $iHeight > $iMaxHeight)
|
||||
{
|
||||
if($iWidth > $iHeight)
|
||||
$dResizeDeltaWidth = $iWidth - $iMaxWidth;
|
||||
$dResizeDeltaHeight = $iHeight - $iMaxHeight;
|
||||
if($dResizeDeltaWidth > $dResizeDeltaHeight)
|
||||
{
|
||||
$iResizedWidth = $iMaxWidth;
|
||||
$iResizedHeight = ($iResizedWidth / $iWidth) * $iHeight;
|
||||
|
||||
Reference in New Issue
Block a user