Преглед на файлове

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)
tags/v0.20.1
Stephen Hu преди 2 месеца
родител
ревизия
7efeaf6548
No account linked to committer's email address
променени са 1 файла, в които са добавени 0 реда и са изтрити 3 реда
  1. 0
    3
      rag/nlp/__init__.py

+ 0
- 3
rag/nlp/__init__.py Целия файл

pixel_data1 = img1.tobytes() pixel_data1 = img1.tobytes()
pixel_data2 = img2.tobytes() pixel_data2 = img2.tobytes()
if pixel_data1 == pixel_data2: if pixel_data1 == pixel_data2:
img2.close()
return img1 return img1


width1, height1 = img1.size width1, height1 = img1.size


new_image.paste(img1, (0, 0)) new_image.paste(img1, (0, 0))
new_image.paste(img2, (0, height1)) new_image.paste(img2, (0, height1))
img1.close()
img2.close()
return new_image return new_image





Loading…
Отказ
Запис