Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to capture image with .png extension using qml camera



  • Hi i need to capture an image with .png extension ,where as it gives default as jpg.How do i do that...

    Here is my code:
    @cameraObj.imageCapture.captureToLocation("/tmp/xxx.png")@

    The above code captures image to destination path ,bt the format is .jpg..
    The output looks like ... @ xxx.png.jpg@

    Please help me if anyone knows the solution

    Thanks in Advance


  • Moderators

    Hi,

    I don't think so that is available. IMO jpeg's are fine for photography. Just capture a high resolution image.
    Otherwise you can convert jpeg to PNG explicitly.


  • Qt Champions 2017

    Hi Bala

    Which platform did you try ? I tried on Mac and able to save file with png extension.



  • Hi p3c0,Dheerendra,

    Thanks for reply..
    I am working on ubuntu and cross compiling to android.wen i give that it saves with .jpg extension nly

    Thanks
    Bala Beemaneni


Log in to reply