MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / load_image

Method load_image

pager/pagerctl.py:614–618  ·  view source on GitHub ↗

Load image from file. Returns opaque handle for draw_image(). Call free_image() when done. Returns None on error.

(self, filepath)

Source from the content-addressed store, hash-verified

612
613 # Image support (JPG, PNG, BMP, GIF)
614 def load_image(self, filepath):
615 """Load image from file. Returns opaque handle for draw_image().
616 Call free_image() when done. Returns None on error."""
617 handle = _lib.pager_load_image(filepath.encode())
618 return handle if handle else None
619
620 def free_image(self, handle):
621 """Free a loaded image."""

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected