BaseImage::thumbnail($_FILES["attachment"]["tmp_name"]["file"],1000,0)->save($folder.$_FILES["attachment"]["name"]["file"]);
exception 'Imagine\Exception\InvalidArgumentException' with message 'Length of either side cannot be 0 or negative, current size is 1000x0'
$img = imagine\Image::getImagine()->open(Yii::getAlias($fullName));
$size = $img->getSize();
$ratio = $size->getWidth()/$size->getHeight();
$width = 200;
$height = round($width/$ratio);
$box = new Box($width, $height);
$img->resize($box)->save($filePath.'/thumb/' . $fileName);
// OR:
imagine\Image::thumbnail($fullName,$width,$height)
->save($filePath.'/thumb/' . $fileName);