Closed dhiravidamani238 closed 1 year ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
The size of the converted base64 image could be quite large. It may be advisable to save it to the local disk and include the filename in the output json.
The size of the converted base64 image could be quite large. It may be advisable to save it to the local disk and include the filename in the output json.
Hi @codeskyblue Thanks for your response.
Hi ,
I'm using this library for my mac os x application. I can getting the screenshot value like "screenshot {'value': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=349x500 at 0x10F663290>, 'timestamp': 1682069034630}" using "tidevice perf -B com.example.app" command. In frontend we are using swift language and we can't convert screenshot value "<PIL.PngImagePlugin.PngImageFile image mode=RGB size=349x500 at 0x10F663290>" to NSImage. So I modified your code(in my local) like converting image to bytes(as modified in the below code) and send to front end. In front end(swift) we can convert the bytes to image and it's working fine. The problem is when I install the tidevice using "pip3 install -U tidevice" command the modified code was removed and new file installed from github. So I can't using the modified code. The code I need to update in github below are
def iter_screenshot(d: BaseDevice) -> Iterator[Tuple[DataType, dict]]: for img in d.iter_screenshot(): _time = time.time() img.thumbnail((200, 200)) # 缩小图片已方便保存
Kindly do the needfull. Thanks.