GithubHelp home page GithubHelp logo

write scrots to stdout? about maim HOT 8 CLOSED

naelstrof avatar naelstrof commented on July 28, 2024
write scrots to stdout?

from maim.

Comments (8)

naelstrof avatar naelstrof commented on July 28, 2024

Heh alright, I actually thought of this as something that could be useful but disregarded it as I couldn't think of an actual use.

For now you can use something like maim /tmp/blah.png;cat /tmp/blah.png, but I'll look into implementing it.

from maim.

naelstrof avatar naelstrof commented on July 28, 2024

My initial findings are that imlib2 provides no support for saving formatted image data directly to stdout.

It's hardcoded to save to a file so badly that in order to redirect file saving to stdout I would have to reprogram each individual filetype module's save function. (There's 14 of them)
Each module specifically saves to a file stream that's created and destroyed within the module's save function itself.

The easiest way to provide full support for this would be to save the screenshot normally and then print its contents to stdout. Which can already be done with maim /tmp/blah.png;cat /tmp/blah.png

Alternatively I could provide gimped support by only supporting raw image data being put into stdout.

But for the time being I'm going to try to fix the problem upstream, I'll make a patch and see if they'll accept it.

from maim.

HalosGhost avatar HalosGhost commented on July 28, 2024

Any update on the progress for this? It'd be very helpful to be able to, for example, pipe the image directly into a cli pastebin utility.

πŸ‘ for supporting this (upstream support would, of course, be ideal).

from maim.

naelstrof avatar naelstrof commented on July 28, 2024

I contacted a Imlib2 developer, he said Imlib2 is dead.
I don't want to include a whole new custom imlib2 (imlib3? lmao) in maim just for this feature, however I'm going to look into alternatives to imlib2, supposedly the Enlightenment team is working on a "bigger and better" version.

from maim.

HalosGhost avatar HalosGhost commented on July 28, 2024

D: Oh well then…

from maim.

naelstrof avatar naelstrof commented on July 28, 2024

With b9c44d8, you can now do
maim -f png /dev/stdout
Depending on your system, it should provide the desired effect. Close the issue if you think that's adequate.

from maim.

oatberry avatar oatberry commented on July 28, 2024

Ooh, very nice. Thanks!

from maim.

HalosGhost avatar HalosGhost commented on July 28, 2024

πŸ‘

from maim.

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.