Commit 5bfbae7 1 parent bd73243 commit 5bfbae7 Copy full SHA for 5bfbae7
File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1097,6 +1097,8 @@ def _handle_jpx(
1097
1097
alpha = alpha .convert ("L" )
1098
1098
if img .mode == "P" :
1099
1099
img = img .convert ("RGB" )
1100
+ elif img .mode == "1" :
1101
+ img = img .convert ("L" )
1100
1102
img .putalpha (alpha )
1101
1103
if "JPEG" in image_format :
1102
1104
extension = ".jp2"
Original file line number Diff line number Diff line change @@ -594,3 +594,13 @@ def test_encodedstream_lookup():
594
594
name = "iss2124.pdf"
595
595
reader = PdfReader (BytesIO (get_data_from_url (url , name = name )))
596
596
reader .pages [12 ].images [0 ]
597
+
598
+
599
+ @pytest .mark .enable_socket ()
600
+ def test_convert_1_to_la ():
601
+ """From #2165"""
602
+ url = "https://github.com/py-pdf/pypdf/files/12543290/whitepaper.WBT.token.blockchain.whitepaper.pdf"
603
+ name = "iss2165.pdf"
604
+ reader = PdfReader (BytesIO (get_data_from_url (url , name = name )))
605
+ for i in reader .pages [13 ].images :
606
+ _ = i
You can’t perform that action at this time.
0 commit comments