Update urigen.php

Modified so the input image is opened, and then saved, as jpeg. This is useful to solve some problems with input jpeg format that jsPDF doesn't like.