GithubHelp home page GithubHelp logo

Fast gif resize about imgry HOT 2 OPEN

pressly avatar pressly commented on June 19, 2024
Fast gif resize

from imgry.

Comments (2)

pkieltyka avatar pkieltyka commented on June 19, 2024

The current imagick implementation for gif resizing will flatten each layer, which creates a larger in filesize image, and is MUCH slower to resize because it effectively resizes more bytes per frame to generate the image.

For example: http://imgry.pressly.com/test/fetch?url=http%3A%2F%2Fwww.thisiscolossal.com%2Fwp-content%2Fuploads%2F2015%2F04%2Fcine-1.gif&size=800x

this will load quickly because its already sized/cached -- but, try to change the size query param to 840x or 730x .. pick something ... it will take over 2 seconds. And compare the filesize to the original image url: http://www.thisiscolossal.com/wp-content/uploads/2015/04/cine-1.gif

if you open the gif in an image editor, you will see the layers (frames), the subsequent frames are actually offset positions, layered on top of eachother. Other gifs do use full frames and a 0,0 offset.

The goal is to not have to flatten each frame, and try to keep the frames intact, and resize the respective layers etc. to get the final image.

from imgry.

xiam avatar xiam commented on June 19, 2024

Closed by #9?

from imgry.

Related Issues (15)

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.