Skip to content

sud.createImage ​

JS
    Image sud.createImage()

Creates an image object.

Image object properties:

PropertyTypeDescription
srcStringImage URL,can be a network image address,or a user file or game package file path
widthnumberWidth of the image
heightnumberHeight of the image
onloadfunctionCallback function triggered after the image finishes loading
onerrorfunctionCallback function triggered when an error occurs while loading the image

Return Value

  • Image: The created image object