We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d42ad1 commit 13c69f4Copy full SHA for 13c69f4
paddlex/inference/serving/infra/utils.py
@@ -195,10 +195,7 @@ def read_pdf(
195
# TODO: Do not always use zoom=2.0
196
zoom = 2.0
197
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)
+ image = page.render(scale=zoom, rotation=deg).to_numpy()
202
images.append(image)
203
page_info = PDFPageInfo(
204
width=image.shape[1],
0 commit comments