# 设置画质方法2
#### 方法名称
void setResProfile(Profile profile)
#### 功能描述
设置云手机的画质。Profile 内参数的优先级：level \> width \> height.
1. 如果设置了level，按level匹配处理云机画质档位；
2. 如果没有设置level（值为null），且设置了width，按width距离计算就近的云机画质档位；
3. 如果没有设置level（值为null），width（值为null），且设置了height，按height距离计算就近的云机画质档位。
![](https://support.huaweicloud.com/sdkreference-koophone/public_sys-resources/note_3.0-zh-cn.png)
width和height与分辨率的对应关系：例如1080p画质档位，分辨率为1080x1920，此时width对应于1920，height对应于1080。
另外，参数设置匹配时，还需考虑端侧硬件支持的档位限制。
#### 参数说明
Profile 对象结构：
| 字段名      | 类型       | 说明                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|
| level   | Integer | 画质档位 - 0：自动档  - 1：流畅档  - 2：均衡档  - 3：高清档   |
| width | Integer | 分辨率宽度                                                                                                                                                                                                                                                                                                                        |
| height  | Integer  | 分辨率高度                                                                                                                                                                                                                                                                                                                       |
   
#### 返回值
boolean，设置成功返回true，设置失败返回false。
#### 调用示例
```
Profile profile = new Profile();
profile.setHeight(1080);  // 设置1080p分辨率
CloudPhoneClient.setResProfile(profile);
```
