prepare jpeg as well as jpg