$limitSize) or ($imgHeight > $limitSize)) )
{
try
{
if (!file_exists($tmbPath))
{
$img = new SimpleImage($imgPath);
$pathinfo = pathinfo($srcImg);
if (!file_exists($rootPath . '/thumbs' . $pathinfo['dirname']))
{
mkdir($rootPath . '/thumbs' . $pathinfo['dirname'], 0755, true);
}
$img->best_fit($limitSize, ($limitSize / 4 * 3))->save($tmbPath, 75);
$img = null;
}
return '
' . "\n";
}
catch (exception $e)
{
echo '\n";
return '
' . "\n";
}
}
else
{
return '
' . "\n";
}
}
$content = preg_replace_callback('/
]+>/i', 'xreplace', $content);
return $content;
}
?>