Skip to content

Commit 13c69f4

Browse files
authored
Same for utils.py
1 parent 1d42ad1 commit 13c69f4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

paddlex/inference/serving/infra/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,7 @@ def read_pdf(
195195
# TODO: Do not always use zoom=2.0
196196
zoom = 2.0
197197
deg = 0
198-
image = page.render(scale=zoom, rotation=deg).to_pil()
199-
image = image.convert("RGB")
200-
image = np.array(image)
201-
image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
198+
image = page.render(scale=zoom, rotation=deg).to_numpy()
202199
images.append(image)
203200
page_info = PDFPageInfo(
204201
width=image.shape[1],

0 commit comments

Comments
 (0)