Replies: 1 comment 4 replies
-
My first thought: maybe this is a bug in the Second thought: can you try if the following makes any difference? with Image.open("file.png") as img:
decoded = zxingcpp.read_barcodes(img, formats=zxingcpp.BarcodeFormat.MatrixCodes, return_errors=True) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When loading a large image (~6 mbytes; ~10k x 10k pixels RGB), I'm noticing a memory leak between repeated loads.
I guess I'm looking to ideas on tracing the source of the leak; I suspect its an issue with PIL or maybe how zxing uses PIL (the main allocation is via PILs'
Image.tobytes
which is triggered when we process the image like an array).It seems like PIL isn't freeing up the memory, but I can't figure out why. The net result is a leak of ~300mbytes per load. I don't see this behavior with Openvc /
cv2.imread()
.The flow is equivalent to calling the following repeatedly:
Any ideas?
Using PIL 10.3.0, zxing 2.2.0 release.
Beta Was this translation helpful? Give feedback.
All reactions