1st changed the upload.php file. A line from
if (! $_FILES['image_file']['error'] && $_FILES['image_file']['size'] < 250 * 1024)
to
if (! $_FILES['image_file']['error'] && $_FILES['image_file']['size'] < 2048* 2048)
As I mentioned in the question, changed script.js. A line from
if (oFile.size > 250* 1024)
to
if (oFile.size > 2048 * 2048)
And lastly to be able to save the image in the cropping size rather not in some pre-defined size, I added an extra line of
$iHeight=(int)$_POST['h']; $iWidth=(int)$_POST['w'];
before this line
$vDstImg = @imagecreatetruecolor( $iWidth, $iHeight );
Then the image will be saved in exact same size as cropped in preview.