diff options
| author | Bryan Newbold <bnewbold@archive.org> | 2020-06-25 17:23:06 -0700 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-25 17:23:06 -0700 | 
| commit | 585e0ba76687ae2872faed88bd1edc5b051136ca (patch) | |
| tree | 332d1915873717bfa440e872dcce457c71c91346 /python/scripts | |
| parent | b150a62569a972b2719da71403b744bafa4f3fb6 (diff) | |
| download | sandcrawler-585e0ba76687ae2872faed88bd1edc5b051136ca.tar.gz sandcrawler-585e0ba76687ae2872faed88bd1edc5b051136ca.zip  | |
poppler: correct RGBA buffer endian-ness
Diffstat (limited to 'python/scripts')
| -rwxr-xr-x | python/scripts/pdf_thumbnail.py | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/python/scripts/pdf_thumbnail.py b/python/scripts/pdf_thumbnail.py index e093dc3..af08db6 100755 --- a/python/scripts/pdf_thumbnail.py +++ b/python/scripts/pdf_thumbnail.py @@ -22,7 +22,7 @@ def run(inpath, outpath):      renderer = poppler.PageRenderer()      full_page = renderer.render_page(page) -    img = Image.frombuffer("RGBA", (full_page.width, full_page.height), full_page.data, 'raw', "RGBA", 0, 1) +    img = Image.frombuffer("RGBA", (full_page.width, full_page.height), full_page.data, 'raw', "BGRA", 0, 1)      img.thumbnail((180,300), Image.BICUBIC)      #img.thumbnail((360,600), Image.BICUBIC)      img.save(outpath)  | 
