changing quality to a value between 0-1