From a9e6d76e9971ee8d6a8a8b681e260d1030d35667 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 30 Mar 2023 23:59:05 -0700 Subject: [PATCH] python-codecs: fix libav jpeg export --- plugins/python-codecs/package-lock.json | 4 ++-- plugins/python-codecs/package.json | 2 +- plugins/python-codecs/src/pilimage.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/python-codecs/package-lock.json b/plugins/python-codecs/package-lock.json index e013e9b5a..26bc3b58b 100644 --- a/plugins/python-codecs/package-lock.json +++ b/plugins/python-codecs/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/python-codecs", - "version": "0.1.25", + "version": "0.1.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@scrypted/python-codecs", - "version": "0.1.25", + "version": "0.1.26", "devDependencies": { "@scrypted/sdk": "file:../../sdk" } diff --git a/plugins/python-codecs/package.json b/plugins/python-codecs/package.json index d20524eab..04d458d50 100644 --- a/plugins/python-codecs/package.json +++ b/plugins/python-codecs/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/python-codecs", - "version": "0.1.25", + "version": "0.1.26", "description": "Python Codecs for Scrypted", "keywords": [ "scrypted", diff --git a/plugins/python-codecs/src/pilimage.py b/plugins/python-codecs/src/pilimage.py index 51896280c..d0a6d0dda 100644 --- a/plugins/python-codecs/src/pilimage.py +++ b/plugins/python-codecs/src/pilimage.py @@ -37,7 +37,8 @@ class PILImage(scrypted_sdk.VideoFrame): def save(): bytesArray = io.BytesIO() - pilImage.pilImage.save(bytesArray, format=options['format']) + pilImage.pilImage.save(bytesArray, format='JPEG') + # pilImage.pilImage.save(bytesArray, format=options['format']) return bytesArray.getvalue() return await to_thread(lambda: save())