comparison sat_frontends/bridge/pb.py @ 3201:439e2f88c3a9

core, bridge: new `imageGeneratePreview` helped method to generate a thumbnail
author Goffi <goffi@goffi.org>
date Sun, 01 Mar 2020 18:48:06 +0100
parents d10b2368684e
children ae09989e9feb
comparison
equal deleted inserted replaced
3200:5c3bf37f2202 3201:439e2f88c3a9
381 d.addCallback(callback) 381 d.addCallback(callback)
382 if errback is None: 382 if errback is None:
383 errback = self._generic_errback 383 errback = self._generic_errback
384 d.addErrback(errback) 384 d.addErrback(errback)
385 385
386 def imageGeneratePreview(self, image_path, profile_key, callback=None, errback=None):
387 d = self.root.callRemote("imageGeneratePreview", image_path, profile_key)
388 if callback is not None:
389 d.addCallback(callback)
390 if errback is None:
391 errback = self._generic_errback
392 d.addErrback(errback)
393
386 def imageResize(self, image_path, width, height, callback=None, errback=None): 394 def imageResize(self, image_path, width, height, callback=None, errback=None):
387 d = self.root.callRemote("imageResize", image_path, width, height) 395 d = self.root.callRemote("imageResize", image_path, width, height)
388 if callback is not None: 396 if callback is not None:
389 d.addCallback(callback) 397 d.addCallback(callback)
390 if errback is None: 398 if errback is None:
816 def imageCheck(self, arg_0): 824 def imageCheck(self, arg_0):
817 d = self.root.callRemote("imageCheck", arg_0) 825 d = self.root.callRemote("imageCheck", arg_0)
818 d.addErrback(self._errback) 826 d.addErrback(self._errback)
819 return d.asFuture(asyncio.get_event_loop()) 827 return d.asFuture(asyncio.get_event_loop())
820 828
829 def imageGeneratePreview(self, image_path, profile_key):
830 d = self.root.callRemote("imageGeneratePreview", image_path, profile_key)
831 d.addErrback(self._errback)
832 return d.asFuture(asyncio.get_event_loop())
833
821 def imageResize(self, image_path, width, height): 834 def imageResize(self, image_path, width, height):
822 d = self.root.callRemote("imageResize", image_path, width, height) 835 d = self.root.callRemote("imageResize", image_path, width, height)
823 d.addErrback(self._errback) 836 d.addErrback(self._errback)
824 return d.asFuture(asyncio.get_event_loop()) 837 return d.asFuture(asyncio.get_event_loop())
825 838