Giter VIP home page Giter VIP logo

Comments (3)

icholy avatar icholy commented on August 17, 2024

Hey, the osx stuff was contributed. But I'm guessing it has something to do with this line

if (sprintf(cmd, "convert %05d_%d.png -background white -quiet -flatten +matte -crop +0+22 -crop +4+0 -crop -4-0 +repage %05d_%d.png", index, delay, index, delay) < 0) {

from ttygif.

DiegoRBaquero avatar DiegoRBaquero commented on August 17, 2024

Yes, it has to do with retina (2x pixels). Run the recording in a non-retina display.

from ttygif.

mscottnelson avatar mscottnelson commented on August 17, 2024

Also an issue when using eg iTerm2 where the crop size does not match Apple window frame anyway. And, further, if the terminal session exists within a window that contains more than just the single session (for example, a multi-tab session), then the cropping will also fail.

To fix properly, will probably need to make the crop dimensions of the line mentioned by @icholy dependent on the amount of visible characters. This will be terminal emulator specific. Could grab total window height with something like osascript -so -e 'tell app \"%s\" to bounds of current window' | awk 'print {$4-$2}' and compare with number of visible rows for the session, eg tput lines, tput cols or stty size. However, I'm not sure how to go about retrieving the pixel size of the emulated character (even for specifically within iTerm2) to perform the conversion that would calculate the appropriate amount of cropping.

from ttygif.

Related Issues (20)

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.