END OF OUTPUT
Source Code of convert.php
<!DOCTYPE HTML><HTML><BODY>
<form action='' method='POST'>
WIDTH: <input name='maxWidth' type='number' value='1024'/><br/>
HEIGHT: <input name='maxHeight' type='number' value='768'/><br/>
<input type='submit' value='CONVERT'/>
</form>
<?php
if (isset($_POST['maxWidth'])) {
$filename = "Nikon-D800E-Image-Sample-4.jpg";
$convertedName = "mythumb.jpg";
$thumb = new Imagick();
$thumb->readImage($filename);
$thumb->resizeImage($_POST['maxWidth'],$_POST['maxHeight'],Imagick::FILTER_LANCZOS,1,1);
$thumb->writeImage($convertedName);
$thumb->clear();
$thumb->destroy();
echo "<img src='".$convertedName."'/>\n";
}
//WILL DISPLAY CODE OF THIS FILE ON THE WEBPAGE//
//######################################################################
echo "<br/><br/><hr><hr>";
echo "<h2 style='text-align:center'>END OF OUTPUT</h2>\n";
echo "<hr><hr>";
echo "<h2><br>Source Code of ".basename((string)__FILE__) . "</h2><hr>";
show_source(__FILE__);
//#######################################################################
//
?>
</BODY></HTML>