Giter VIP home page Giter VIP logo

Comments (3)

PeterMX avatar PeterMX commented on June 18, 2024 1

Hi, No, I don't know how to cache pic,
on the other hand, in your code you set 500000 as max size but it should be 512000(as said in Whatsapp repo), 12000 bytes is big enought to miss some valid stickers

from tgs2animated.

PeterMX avatar PeterMX commented on June 18, 2024

Hi, using -q 0 will reduce quallity and you will get smaller webps, but it will no be enought to get 500kb, with a small change in render.cpp in the for loop you can skip some frames and that will help you get those 500kb or smaller.

from tgs2animated.

0xNima avatar 0xNima commented on June 18, 2024

Hi again Peter. Now I can reduce the final size by skipping some frames and check the webp_data size and repeat again until to reach the desired size. The reason that I use this approach is that I want to remove less frames as much as possible.
I notice that in this approach, frames recalculated in each iteration. I tried to memoize the calculated frames by storing pic (in the addFrame method) in a map but it doesn't work.
Do you have any suggestion to cache the calculated frames?

from tgs2animated.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.