How to draw a GIF with Scale to IMAGE Widget and keep transparency?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • How to draw a GIF with Scale to IMAGE Widget and keep transparency?

      Thank you for all.

      I want to draw a scaled GIF SUB(s) Images with IMAGE widget.
      I set a Callback of IMAGE, and use GUI_GIF_DrawSubScaled at WM_Paint.
      but the Transparency of My GIF Animated has loss.

      void cbAnimation(WM_MESSAGE* pMsg)
      const tAnimation *rAnimation;
      switch (pMsg->MsgId)
      case WM_PAINT:
      GUI_GIF_DrawSubScaled(Image, Size, 0, 0, Frame, 1, 2);
      default: WM_DefaultProc(pMsg);

      hwnd= IMAGE_CreateUser(0, 0, 100, 100, 0, WM_CF_SHOW , IMAGE_CF_MEMDEV, 0, sizeof(void *));
      IMAGE_SetGIF(hwnd, Image, Size);

      (the variables are use only for explaining.)

      Also i try with Window, the result was same

      whould you send me an example for how to draw a correct scaled GIF sub Image?

      At attachment picture(s), there are two type of GIF Animated.

      Best Regards.
      • Capture.PNG

        17.33 kB, 687×323, viewed 264 times
    • Hi,

      Attached is a short example.

      The reason on side is most likely related to the GIF. Try to open the GIF with GIMP (or any other image editor tool) and un-optimize the GIF. Most GIFs are saved optimzed which means they store only the difference to the previous image. Unfortunately, this results in a strange output when only a sub image gets drawn.