function sumlyResizeImage(picobj, maxwidth, maxheight)
{
	if(picobj.height > picobj.width)
		picobj.height=maxheight;
	else
		picobj.width=maxwidth;
}
