Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GIMP Python-Fu Export all open images to pdf
#7
(04-01-2022, 08:41 PM)Ofnuts Wrote:
(04-01-2022, 04:41 AM)PixLab Wrote: you should have something alike

   images = gimp.image_list()
   images_ids = [img.ID for img in images]
   pdb.file_pdf_save_multi(len(images), images_ids, False, False, False, filename, filename)
This programming teacher says that there is a big bug in the making, because you are assuming that images and image_ids have the same length, and this can become false later on (for instance if you filter ilages on type/name/whatever).

That can be a bug. I will switch to len(image_ids) and image_ids=[image_id for image_id in image_ids if image_id is not none]
Although in my case it shouldn’t make any difference. The reason is I will always apply same set of operations on all valid open pages and no pages will be deleted
Reply


Messages In This Thread
RE: GIMP Python-Fu Export all open images to pdf - by billalmasum93 - 04-01-2022, 10:34 PM

Forum Jump: