diff --git a/src/pypdfium2/_cli/extract_images.py b/src/pypdfium2/_cli/extract_images.py index 6fd94569e..873f62756 100644 --- a/src/pypdfium2/_cli/extract_images.py +++ b/src/pypdfium2/_cli/extract_images.py @@ -69,7 +69,7 @@ def main(args): try: if args.use_bitmap: pil_image = image.get_bitmap(render=args.render).to_pil() - pil_image.save( prefix.with_suffix("."+args.format) ) + pil_image.save(f"{prefix}.{args.format}") else: image.extract(prefix, fb_format=args.format, fb_render=args.render) except pdfium.PdfiumError: