sud.createImage
JS
Image sud.createImage()Creates an image object.
Image object properties:
| Property | Type | Description |
|---|---|---|
| src | String | Image URL,can be a network image address,or a user file or game package file path |
| width | number | Width of the image |
| height | number | Height of the image |
| onload | function | Callback function triggered after the image finishes loading |
| onerror | function | Callback function triggered when an error occurs while loading the image |
Return Value
- Image: The created image object
