Проблем с Image resize скрипт

PHP_Masters

Registered
Намерих си едно resize image скрипт ето го и него

function ResizeImage(image, maxwidth, maxheight)
{
if (image.className == "Thumbnail")
{
w = image.width;
h = image.height;

if( w == 0 || h == 0 )
{
image.width = maxwidth;
image.height = maxheight;
}
else if (w > h)
{
if (w > maxwidth) image.width = maxwidth;
}
else
{
if (h > maxheight) image.height = maxheight;
}

image.className = "ScaledThumbnail";
}
}

1во не разбирам къде да напиша maxheight и maxwidht

2-ро извеждам тая функция с

.html('<br/><br/>'+ResizeImage(image));

между скобите има една променлива която съм си направил

и ми изкарва така undefined
 

Back
Горе