Closed ktsaou closed 4 years ago
Hi,
Thanks for the kind words!
OK. Perfect!
Just a note, I write to /run
which is tmpfs. This is the way I use raspistill too. SD cards are awfully slow.
As I said. Everything is good even the way it is now.
Thanks.
Hi again.
In case it is useful to you, I found https://github.com/info-beamer/tools/tree/master/screenshot, that outputs JPEG and is fast enough (I measured more that 5 screenshots per second). It doesn't scale or rotate the image though. It also seems pretty simple code...
Thanks.
Sorry for the long delay. Thanks for that, so hopefully that is a solution for you. I actually wrote a program that I called raspi2jpg before I wrote raspi2png, but I never put the code up on github.
Thank you very much for raspi2png!
I would like to make 2 suggestions:
It would be useful to support writing to stdout. I normally snapshot the pi screen to send it to a web page. Now I do something like this using inetd:
The extra effort to save and delete the image could be avoided if raspi2png could just write the png image to its stdout.
raspi2png is somewhat slow. I don't know if this is because I need it to scale the image, or because the png compression is too complex for a pi.
In any case, it would be perfect if you could speed it up (for example the OMX API may already provide hardware scaling, or it may provide hardware JPEG encoding - I guess it does both because raspistill is a lot faster, capable of capturing and saving many JPEG frames per second - of course from the camera, not the screen).
Anyway, thank you very much. Even the way it is now, raspi2png is very helpful.