Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
pdf_to_img
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7ef37540
authored
2022-10-31 11:27:39 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update pdf_to_img.py
1 parent
58addb24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
pdf_to_img.py
pdf_to_img.py
View file @
7ef3754
...
...
@@ -81,7 +81,12 @@ 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
# return doc.extractImage(xref)
@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