Answer the question
In order to leave comments, you need to log in
How to create gif animation in NodeJS?
There is an array of jpg images in base64 format. How to create a gif animation from this data and display the gif as the same base64?
Everywhere in the example modules like gifencoder, pngFileStream, createReadStream and createWriteStream are used, and so on.
They all operate on files on the server, reading from the server and writing to the server.
And how to make a gif reading base64 from a variable and after assembling the gif also write base64 to a variable without writing it to the server disk?
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var urlencodedParser = bodyParser.urlencoded(({ limit: '150mb', extended: true, parameterLimit: 50 }));
app.post('/', urlencodedParser, function(req,res){
var imgs = JSON.parse(req.body.imgs);
//тут в imgs принимаем массив с base64 ["data:image/jpeg..." , "data...", "..."]
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question