Jump to content

Denis Sergeev

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Denis Sergeev

  1. On 12/06/2018 at 06:25, inmarket said:

    If it is a non-cycling multi-family GIF image the last frame will return TIME_INFINITE. If you want to start at the beginning again just call gdispImageNext again. 

    So to turn a non-cycling GIF image into a cycling image just replace a TIME_INFINITE delay period with a set period that you want the last frame displayed for before restarting.

    I'm sorry that I was not clear enough. But I want to restart any animated gif image from any position. I have written such function in gdisp_image_gif.c:

    void gdispImageReset_GIF(gdispImage *img) {
       gdispImagePrivate_GIF * priv = (gdispImagePrivate_GIF *)img->priv;
       gfileSetPos(img->f, priv->frame0pos);
       initFrameGif(img);
    }

    It seems to be working as I expect. What do you think about it? If it works well, you may add it to your repository. Or you can even implement generalized function, which may move file position to any specified frame at any time.

  2. I am using such construction to display GIF image:

    while (1) {
        gdispImageCache(&myImage);
        gdispImageDraw(&myImage, 0, 0, myImage.width, myImage.height, 0, 0)
        delay = gdispImageNext(&myImage);
     
        gfxSleepMilliseconds(delay);
    }

    I want to reset image, so that it will start displaying from the first frame. I haven't fount any function, which could perform such action. Can anybody suggest the solution?

×
×
  • Create New...