Grx.Context.load_from_pnm_data

@accepts(Grx.Context, guint8)
@returns(bool)
def load_from_pnm_data(self, buffer):
    # Python wrapper for grx_context_load_from_pnm_data()
  

Load a context from a PNM buffer

Support only PBM, PGM and PPM binary buffers with maxval < 256

If context dimensions are lesser than pnm dimensions, the routine loads as much as it can

If color mode is not in RGB mode, the routine allocates as much colors as it can

self

Context to be loaded or None to use the global context

buffer

Buffer that holds data

Returns