B4J Library Animated GIF Encoder

Discussion in 'B4J Libraries & Classes' started by Blueforcer, Jul 19, 2019.

  1. Blueforcer

    Blueforcer Active Member Licensed User

    This Library allows you to create your own GIFs from Images.


    Code:
    Dim gif As AnimatedGifEncoder
    gif.Initialize
    gif.setSize(
    160,160)
    gif.Delay=
    250
    gif.Quality=
    10
    gif.Repeat=
    0

    Dim filename As String = "sample.gif"
    Dim out As OutputStream
    out = 
    File.OpenOutput(File.DirApp, filename, False)
     
    gif.start(out)
     
    For i=0 To 32
        gif.addFrame(xui.LoadBitmap(
    File.DirAssets, i & ".jpg"))
    Next
     
    gif.finish
    Out.Close
     

    Attached Files:

    Last edited: Jul 19, 2019
    Erel, mangojack, emexes and 5 others like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice