diff --git a/examples/extract-images/extract-from-pages.py b/examples/extract-images/extract-from-pages.py index 4d3003d..065d312 100644 --- a/examples/extract-images/extract-from-pages.py +++ b/examples/extract-images/extract-from-pages.py @@ -40,6 +40,7 @@ Changes ------- +* 2024-03-29: update progress meter function call * 2021-09-17: remove PIL and use extended pixmap features instead * 2020-10-04: for images with an /SMask, we use Pillow to recover original * 2020-11-21: convert cases with special /ColorSpace definitions to RGB PNG @@ -121,11 +122,12 @@ def recoverpix(doc, item): xreflist = [] imglist = [] for pno in range(page_count): - sg.QuickMeter( + sg.one_line_progress_meter( "Extract Images", # show our progress pno + 1, page_count, "*** Scanning Pages ***", + orientation = "h", ) il = doc.get_page_images(pno) diff --git a/examples/extract-images/extract-from-xref.py b/examples/extract-images/extract-from-xref.py index 0b37712..c86576a 100644 --- a/examples/extract-images/extract-from-xref.py +++ b/examples/extract-images/extract-from-xref.py @@ -46,7 +46,8 @@ Changes -------- -2021-09-17: Removed PIL dependency +* 2024-03-29: update progress meter function call +* 2021-09-17: Removed PIL dependency """ from __future__ import print_function @@ -116,11 +117,12 @@ def recoverpix(doc, x, imgdict): # loop through PDF images # ------------------------------------------------------------------------------ for xref in range(1, lenXREF): # scan through all PDF objects - sg.QuickMeter( + sg.one_line_progress_meter( "Extract Images", # show our progress xref, lenXREF, "*** Scanning Cross Reference ***", + orientation = "h", ) if doc.xref_get_key(xref, "Subtype")[1] != "/Image": # not an image