added ability to set quality image in resize method