<?php
 
 
require("imageOptimzer.php");
 
 
if(isset($_POST['optimizePhoto'])){
 
    $testImage = new imageOptimzer($_FILES["file"],$_POST['maxWidth'],$_POST['maxHeight'],$_POST['quality']);    
 
}
 
 
 
 
?>
 
 
<h1>Upload an image (jpg/gif/png) and get an optimzed PNG version</h1>
 
<form class="form-horizontal" method="post" action="" enctype="multipart/form-data">
 
    <label for="uitleg" class="control-label">Upload a picture to Optimize</label><br><br>
 
    max. width: <input type="number" value='1000' name='maxWidth'><br>
 
    max. height: <input type="number" value='1000' name='maxHeight'><br>
 
    Quality (0-9): <input type="number" value='9' min=0 max=9 name='quality'><br>
 
    <input type="file" name="file" id="file"><br><br>
 
    <input type="submit" name="optimizePhoto" class="btn btn-primary" value="Optimize!">
 
</form>
 
 
 |