We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
quickApp ReferencesQuick GameRuntime Quick GameRenderingImage

Image

NOTE

Starting from version 1078, the API prefix has been changed from hbs to qg. The original prefix hbs is still supported.

Definition

Quick games have implemented the standard image function. For details, please refer to Image API.

Expand

API

Description

qg.createImage()

Creates an image object.

qg.createImage()

  • Description

    Creates an image object.

  • Returns

    Image object. The image attributes are as follows.

    Expand

    Attribute

    Type

    Description

    src

    string

    Image URL.

    width

    number

    Actual image width.

    height

    number

    Actual image height.

    onload

    function

    Callback function triggered after an image is loaded.

    onerror

    function

    Callback function triggered after an image loading error occurs.