add param quality for jpeg and png