Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
07c844aa
authored
2022-09-22 15:09:00 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix pdf_to_img
1 parent
44df52f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
src/common/tools/pdf_to_img.py
src/common/tools/pdf_to_img.py
View file @
07c844a
...
...
@@ -205,7 +205,11 @@ class PDFHandler:
tpix
=
fitz
.
Pixmap
(
fitz
.
csRGB
,
pix
)
return
tpix
else
:
return
doc
.
extractImage
(
xref
)
res
=
doc
.
extractImage
(
xref
)
if
res
is
None
:
return
fitz
.
Pixmap
(
doc
,
xref
)
else
:
return
res
@staticmethod
def
get_img_data
(
pix
):
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment