(self, index=0)
| 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 | |
| 125 | class OpencvImRead(OpencvImage, OpencvWidget): |
nothing calls this directly
no test coverage detected