Closed ghost closed 8 years ago
No, not really. The program is relatively simple. You may get some improvement if you write the captured file to a ram drive, rather than to the sdcard. Other than that the only option to speed things up would be to get the GPU to do the file encoding.
I have added a command line option to set the compression level of the PNG image. If you set a low compression level (default is 6), then the compression of the image should take less time. However the resulting PNG file will be larger and may take longer to save.
Thank you, actually I want to convert screenshot to jpg for lower image size, because I want to transmit it over wire, so let's see if imagemagic can convert image faster or not
Have a look at @dividuum's screenshot. It takes a snapshot and writes a JPG to stdout.
It should also be possible to use OMX to offload the jpeg encoding to the GPU. Since the CPU version works well enough for now I didn't look into that yet.
@dividuum Yes, you could use OMX or MMAL to encode the jpeg on the GPU. On the Pi 2B it may not be worth the extra effort.
@AndrewFromMelbourne thank you @dividuum's screenshot is fast and file size is small. Feel free to close issue.
It almost takes 2 seconds to take a picture, is it possible to improve performance?