Convert a Raw Framebuffer Dump to a PNG

IN_FILE=...

IN_FORMAT="BGR"
IN_WIDTH="1920"
IN_HEIGHT="1080"

OUT_FILE="${IN_FILE%.*}.png"

gst-launch-1.0 -v filesrc "location=${IN_FILE}" blocksize=$(stat "${IN_FILE}" -c%s) ! \
    video/x-raw,format=${IN_FORMAT},width=${IN_WIDTH},height=${IN_HEIGHT},framerate=0/1 ! \
    videoconvert ! \
    video/x-raw,format=RGB,framerate=0/1 ! \
    pngenc ! \
    filesink "location=${OUT_FILE}"