Invalid image format error

Sebastian Dröge sebastian at
Wed Apr 13 07:33:06 UTC 2016

On Di, 2016-04-12 at 08:21 -0700, ramtheconqueror wrote:
> I'm using GStreamer (camerabin) to generate the jpg files which does work as
> expected on Linux dev machine and on Windows desktop. But my Qt application
> throws this error
> QML Image: Invalid image data: file:///home/camera/capture_0.png
> I'm using camerabin of GStreamer and using this image-capture-caps.
> GstCaps *caps = gst_caps_new_full (gst_structure_new ("video/x-raw",
>     "format", G_TYPE_STRING, "YUY2", "width", G_TYPE_INT, 1280, "height",
> G_TYPE_INT, 1024, NULL), NULL);
> g_object_set (m_cameraBin, "image-capture-caps", caps, NULL);
> gst_caps_unref (caps);
> m_cameraBin->setProperty("location", "/home/camera/capture_%d.jpg");
> I then call QGlib::emit(m_cameraBin, "start-capture");
> I've tried different formats like RGB which didn't work either.
> Any help? Thanks

video/x-raw is raw video, QImage (and your code) assumes a image
format. Try using "image/png" to get a PNG image.

Sebastian Dröge, Centricular Ltd ·
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list