B4i Library Gif Maker for B4i

ilan

Expert
Licensed User
il_GifMaker
Author:
Ilan Tetruashvili (info@sagital.net)
Version: 0.1

  • il_GifMaker
    Events:
    • Initialize: ()
      Initializes the object
    • create:: (l As List, FileName As String, Speed As Float)
      Create the Gif from a list of images and stores it in File.Dirdocuments

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
  
    Private myGifmaker As il_GifMaker
End Sub

Private Sub Application_Start (Nav As NavigationController)
    'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
  
    Dim l As List
    l.Initialize
  
    For i = 0 To 3
        l.Add(LoadBitmap(File.DirAssets,$"f${i}.png"$)) 'add images to list
    Next
  
    myGifmaker.Initialize
    myGifmaker.create(l,"mygif.gif",0.1) 'Gif saved to File.DirDocuments
  
    Log(File.ListFiles(File.DirDocuments)) 'log all files in File.Dirdocuments
End Sub


pikachu.gif
 

Attachments

Last edited:

ilan

Expert
Licensed User
The .a file is missing.
yes you are right, i forgot to add the .a file to the zip. it is fixed and the zip has been updated in the first post.

It will be simpler to share the source code or share it as a b4xlib.
it is not a b4x lib so it would not be right to create a b4x lib and about sharing the code, i may want to improve it in the future and sell it for few $ so for now, i would like to keep it as a b4i lib maybe in some point i will share the code.
 
Top