Saving the drawn image to the database