greenwich/raster.py
def frombytes(data, size, bandtype=gdal.GDT_Byte):
    """Returns an in-memory raster initialized from a pixel buffer.

    Arguments:
    data -- byte buffer of raw pixel data
    size -- two or three-tuple of (xsize, ysize, bandcount)
    bandtype -- band data type
    """
    r = ImageDriver('MEM').raster('', size, bandtype)
    r.frombytes(data)
    return r
def frombytes(data, size, bandtype=gdal.GDT_Byte):
    """Returns an in-memory raster initialized from a pixel buffer.

    Arguments:
    data -- byte buffer of raw pixel data
    size -- two or three-tuple of (xsize, ysize, bandcount)
    bandtype -- band data type
    """
    r = ImageDriver('MEM').raster('', size, bandtype)
    r.frombytes(data)
    return r
Returns an in-memory raster initialized from a pixel buffer.

    Arguments:
    data -- byte buffer of raw pixel data
    size -- two or three-tuple of (xsize, ysize, bandcount)
    bandtype -- band data type