Reworked saveImage() function & Added image preview box