diff --git a/inc/functions.php b/inc/functions.php index 15408ef..424045c 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -30,9 +30,9 @@ function setPageMime($sType='html') if($sType!='html' && array_key_exists($sType, $asMainTypes)) header('Content-type: '.$asMainTypes[$sType].'/'.$sType); } -function getTrimImage($iFilmId, $sinPath, $sImageExt) +function getTrimImage($iFilmId, $sSize, $sinPath, $sImageExt) { - $sOutPath = 'images/'.$iFilmId.'.'.$sImageExt; + $sOutPath = 'images/'.$iFilmId.'_'.$sSize.'.'.$sImageExt; if(!file_exists($sOutPath)) { $oImage = call_user_func('imagecreatefrom'.$sImageExt, $sinPath); diff --git a/index.php b/index.php index d9f9377..863097c 100755 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ switch($sAction) $sResult = getPage($asData['path'], $asData['vars']); break; case 'get_poster': - $sResult = getTrimImage($asData['id'], $asData['url'], $sType); + $sResult = getTrimImage($asData['id'], $asData['size'], $asData['url'], $sType); break; default: $sResult = file_get_contents('masks/index.html'); diff --git a/masks/index.html b/masks/index.html index 2343a36..b57a56a 100755 --- a/masks/index.html +++ b/masks/index.html @@ -12,7 +12,6 @@