未验证 提交 915a03b6 编写于 作者: O openharmony_ci 提交者: Gitee

!16057 翻译完成:15764+15843+15813 media+image APIs

Merge pull request !16057 from wusongqing/TR15764
......@@ -948,8 +948,18 @@ Creates an **ImageSource** instance based on the URI.
**Example**
```js
let context = featureAbility.getContext();
let path = context.getCacheDir() + "test.jpg";
// Stage model
const context = getContext(this);
const path = context.getCacheDir() + "/test.jpg";
const imageSourceApi = image.createImageSource(path);
```
```js
// FA model
import featureAbility from '@ohos.ability.featureAbility';
const context = featureAbility.getContext();
const path = context.getCacheDir() + "/test.jpg";
const imageSourceApi = image.createImageSource(path);
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册