• Welcome to PowerBasic Museum 2020-A.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Animated PNG

Started by Patrice Terrier, November 09, 2016, 05:58:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

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.

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

Patrice Terrier

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

    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