MCPcopy Create free account
hub / github.com/rawpython/remi / get_image_data

Method get_image_data

editor/widgets/toolbox_opencv.py:111–122  ·  view source on GitHub ↗
(self, index=0)

Source from the content-addressed store, hash-verified

109 """ % {'id': self.identifier, 'frame_index':str(time.time())})
110
111 def get_image_data(self, index=0):
112 gui.Image.set_image(self, '/%(id)s/get_image_data?index=%(frame_index)s'% {'id': self.identifier, 'frame_index':str(time.time())})
113 self._set_updated()
114 try:
115 ret, png = cv2.imencode('.png', self.img)
116 if ret:
117 headers = {'Content-type': 'image/png', 'Cache-Control':'no-cache'}
118 return [png.tostring(), headers]
119 except Exception:
120 pass
121 #print(traceback.format_exc())
122 return None, None
123
124
125class OpencvImRead(OpencvImage, OpencvWidget):

Callers

nothing calls this directly

Calls 2

_set_updatedMethod · 0.80
set_imageMethod · 0.45

Tested by

no test coverage detected