import tempfile
import base64


def _process_png(image_data):
    """Process a PNG: just save the received b64encoded data to a temp file."""
    _, fname = tempfile.mkstemp(suffix='.png')
    with open(fname, 'wb') as fh:
        fh.write(base64.b64decode(image_data))
    return fname