fixed image scaling with negqtive values, keep aspect ration