New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STDIN? #19
Comments
Shouldn't be hard but quite busy at the moment... Happy to accept a pull request O:) |
p.s. did you try /dev/stdin as file name? |
I have tried it, it does not work because somehow it does not recognize the file format:
For PNG images I can do ln -s /dev/stdin /tmp/stdin.png
cat wmiz.png | tiv /tmp/stdin.png |
There's a not so clean approach, to save input in a temporary file, run program on it, and then, delete it. I think process image data directly needs some changes in CImg library. Creating an issue in CImg's repo for this may be good. |
The reason why the extension works is probably that it saves cimg from consuming part of the file to figure out the type. Maybe we could let the makefile create stdin aliases named stdin.png, stdin.jpg etc. and then use some special parameter to access them? Seems hacky (but still better than a tmp copy) though. Or we just document this approach on the main page? |
Why not just add |
The problem is that CImg (the library that is used to load the images) doesn't seem to support providing the file type by other means than the file extension. The best fix would probably be a corresponding feature in CImg... |
Actually CImg does support specifying the type, using the |
I'll have another look when the snap and macos things are resolved (and nobody has stepped in in the meantime) O:) |
I was wondering what the problem may be and had a look at it (TL;DR: not successfully):
When I get time I'll gotta put a question on CImg.h github. |
Perhaps it fails because I'd really like to have this as well, but I'm not willing to dig through the 64kloc of |
How much of a pain would it be to take input from stdin?
The text was updated successfully, but these errors were encountered: