Skip to content

Commit

Permalink
python-codecs: fix vips/yuv/gray fast path
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 31, 2023
1 parent a9e6d76 commit b3a0cda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/python-codecs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/python-codecs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/python-codecs",
"version": "0.1.26",
"version": "0.1.27",
"description": "Python Codecs for Scrypted",
"keywords": [
"scrypted",
Expand Down
4 changes: 4 additions & 0 deletions plugins/python-codecs/src/vipsimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def format():
mem = memoryview(rgb.write_to_memory())
return mem
return await to_thread(format)
elif options['format'] == 'gray':
def format():
return memoryview(vipsImage.vipsImage.write_to_memory())
return await to_thread(format)

return await to_thread(lambda: vipsImage.vipsImage.write_to_buffer('.' + options['format']))

Expand Down

0 comments on commit b3a0cda

Please sign in to comment.