Document Solutions Image Viewer
    Preparing search index...

    Type Alias GifOptions

    GIF options.

    type GifOptions = {
        cumulative?: boolean;
        maxBufferLength?: number;
        playOnHover?: boolean;
        playOnClick?: boolean;
        autoPlay?: boolean;
        speed?: number;
    }

    Properties

    cumulative?: boolean

    Cumulative drawing mode - do not clear previous frame appearance.

    maxBufferLength?: number

    Maximum image buffer length to load. The image buffer length is calculated as follows: NumFrames * image.height * image.width * 4. If the GIF image exceeds this value, only the first frame will be loaded. The default and maximum value is 2145386496.

    playOnHover?: boolean

    Play/stop animation on mouse over/out.

    playOnClick?: boolean

    Play/stop animation on mouse click.

    autoPlay?: boolean

    Automatically play video when a GIF image contains more than one frame.

    speed?: number

    Animation speed. The delay between frames will be divided by the value specified in the "speed" setting. The lower the value, the slower the animation will run. The higher the value, the faster the animation runs.

    1
    
    // Slowing down the animation by two times:
    const viewer = new GcImageViewer("#root", {
    gifOptions: { speed: 0.5 }
    });
    // Animation acceleration by two times::
    const viewer = new GcImageViewer("#root", {
    gifOptions: { speed: 2 }
    });