Author Topic: Animated PNG  (Read 715 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2396
  • Gender: Male
    • www.zapsolution.com
Animated PNG
« on: November 09, 2016, 05:58:18 PM »
PNGanim

Is a WinLIFT/GDImage visual utility to display and adjust the animation speed of ani_PNG FILES.



The animation speed could range between 1 to 100 milliseconds (GetTickCount).

Note: The whole concept of this new PNG animation format is explained here.
with plainty of PNG animated files there.


The PowerBASIC 32-bit code is attached to this post altogether with 1 PNG animation file.

« Last Edit: November 10, 2016, 07:00:13 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2396
  • Gender: Male
    • www.zapsolution.com
Animated PNG (updated)
« Reply #1 on: November 10, 2016, 06:59:26 PM »
I just post a new version of the PNGanim.exe utility to display and adjust the animation speed of ani_PNG FILES.

New feature:
- Frame count display

Fix:
- To avoid unespected resizing when moving the PNGanim.exe window to the edges.
Handling of WM_MOVING message has been added, to keep the window within the bounds of the working area

Code: [Select]
    case %WM_GETMINMAXINFO
         pMM = lParam
         @pMM.ptMinTrackSize.x = gP.MinTrackSizeW
         @pMM.ptMinTrackSize.y = gP.MinTrackSizeH
         function = 0: exit function

    case %WM_MOVING '// Keep the window into the working area
         hMonitor = MonitorFromWindow(hWnd, %MONITOR_DEFAULTTONEAREST)
         lpr = lParam
         if (@lpr.nTop < 0) then @lpr.nTop = 0
         @lpr.nRight = @lpr.nLeft + gP.MinTrackSizeW
         @lpr.nBottom = @lpr.nTop + gP.MinTrackSizeH
         tmi.cbSize = sizeof(tmi)
         if (GetMonitorInfo(hMonitor, tmi)) then
             if (@lpr.nBottom > tmi.rcWork.nBottom) then
                 @lpr.nBottom = tmi.rcWork.nBottom
                 @lpr.nTop = @lpr.nBottom - gP.MinTrackSizeH
             end if
         end if
         function = %TRUE: exit function;

The 64-bit version is available there.

If you have questions or comments about it, please post them here.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com