GdkPixbuf* pixbuf = gdk_pixbuf_new_from_bytes(bytes, GDK_COLORSPACE_RGB, false, 8, post->previewWidth, post->previewHeight, post->previewWidth*3);
this fails with: gdk_pixbuf_new_from_bytes: assertion 'g_bytes_get_size (data) >= width * height * (has_alpha ? 4 : 3)' failed
for example, when width is 50, the height is 50, the rowstride is 150, right? Because the formula is width*BPP, which is 3 in case of RGB and 4 in case of RGBA. This works. But when i try to set - for example - 800 and 500, with a rowstride of 2400, it fails with this error.
Even when I switched to calculating the rowstride directly from the image's width, I can't get it to work