1.0.9 • Published 1 year ago

tgs2 v1.0.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

About The Package

Converter from file/buffer stickers Telegram to gif/mp4/webp

Uses

Example 1 from buffer:

const tgs2 = require('tgs2');

let result = await tgs2.buffer2gif(buffer, {
        lottie_config: {
            format: 'gif'
        },
        fileName: 'output.gif',
        exportPath: '/var/www/example.com/public_html/storage'
    }
);

Example 2 from url:

const tgs2 = require('tgs2');

let result2 = await tgs2.url2Gif(
    'https://leadsender.ru/storage/telegram/d3620f583dea05b313c473491c45ffca.tgs',
    {
        lottie_config: {
            format: 'gif'
        },
        exportPath: '/var/www/example.com/public_html/storage'
    }
);

Example 3 from file:

const tgs2 = require('tgs2');

let result2 = await tgs2.file2gif(
    'C:\NodeJS\tgs2\cache\tgs_converter\example1.tgs',
    {
        lottie_config: {
            format: 'gif'
        }, 
        exportPath: '/var/www/example.com/public_html/storage'
    }
);

Config

{
    lottie_config: {
        format: 'gif', //format to convert to, either 'gif' , 'mp4' , 'webp' , 'webm' or 'lottie'
        width: 500, //optional, defaults to 1000
        height: 500 //optional, defaults to 1000
    },
    exportPath: '/var/www/example.com/public_html/storage'
}

Result

{
  file: 'C:\\Users\\Maxim\\WebstormProjects\\untitled\\cache\\tgs_converter\\d3620f583dea05b313c473491c45ffca.gif',
  fileName: 'd3620f583dea05b313c473491c45ffca.gif'
}
1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago