Trouble capturing still images with StillCapture role on Raspberry Pi

dominik greitmann dominik.greit at gmail.com
Thu May 15 05:58:23 CEST 2025


Hello,
I am currently setting up a Raspberry Pi Camera using the libcamera library.
I would like to capture still images and therefore want to use the StillCapture role. However, I am having trouble finding the correct format or reading the image data from the buffer and saving it as an image file.
With the Viewfinder role, everything works fine, but since I care about the quality of the images, I would prefer to use the StillCapture role.
Here is my setup:

  *
Raspberry Pi Camera v2.1
  *
Raspberry Pi 4 Model B Rev 1.2

I've also attached the relevant code files and an example image.
I would be very grateful for any help or suggestions.
Best regards,
Dominik Greitmann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20250515/82c39791/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Terminal_Output.txt
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20250515/82c39791/attachment-0001.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: captured_image.png
Type: image/png
Size: 8759398 bytes
Desc: captured_image.png
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20250515/82c39791/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CameraHandler.cpp
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20250515/82c39791/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CameraHandler.hpp
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20250515/82c39791/attachment-0004.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20250515/82c39791/attachment-0005.ksh>


More information about the libcamera-devel mailing list