def png(out, metadata, f):
    """Convert to PNG format.
    `metadata` should be a Plan9 5-tuple;
    `f` the input file (see :meth:`pixmeta`).
    """

    import png

    pixels, meta = pixmeta(metadata, f)
    p = png.Writer(**meta)
    p.write(out, pixels)
Convert to PNG format.
    `metadata` should be a Plan9 5-tuple;
    `f` the input file (see :meth:`pixmeta`).