Grx.Context.prototype.load_from_pnm_data

function load_from_pnm_data(buffer: Number(guint8)): Boolean {
    // Gjs 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

buffer

Buffer that holds data

Returns

true on success, otherwise false