From 7efeaf65483826afa9d95326d87f041ab7006f03 Mon Sep 17 00:00:00 2001 From: Stephen Hu Date: Wed, 6 Aug 2025 10:59:49 +0800 Subject: [PATCH] Fix:remove a img close which can not operate (#9267) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/9149#issuecomment-3157129587 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/rag/nlp/__init__.py b/rag/nlp/__init__.py index 5c9d42d34..e76624113 100644 --- a/rag/nlp/__init__.py +++ b/rag/nlp/__init__.py @@ -642,7 +642,6 @@ def concat_img(img1, img2): pixel_data1 = img1.tobytes() pixel_data2 = img2.tobytes() if pixel_data1 == pixel_data2: - img2.close() return img1 width1, height1 = img1.size @@ -654,8 +653,6 @@ def concat_img(img1, img2): new_image.paste(img1, (0, 0)) new_image.paste(img2, (0, height1)) - img1.close() - img2.close() return new_image