docs: clarified usage of createFromPath() (#46809)

* docs: clarified usage of createFromPath()

* Update docs/api/native-image.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
This commit is contained in:
Yuri 2025-05-02 17:11:54 +08:00 committed by GitHub
parent f6b297a06a
commit 7153008bfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,8 +142,8 @@ Note: The Windows implementation will ignore `size.height` and scale the height
Returns `NativeImage`
Creates a new `NativeImage` instance from a file located at `path`. This method
returns an empty image if the `path` does not exist, cannot be read, or is not
Creates a new `NativeImage` instance from an image file (e.g., PNG or JPEG) located at `path`.
This method returns an empty image if the `path` does not exist, cannot be read, or is not
a valid image.
```js