Scribusoid

Author Topic: Import multiple images  (Read 181 times)

scriber

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
  • Scribus User
Import multiple images
« on: July 25, 2018, 01:10:32 pm »
Hi all!
I'm using Scribus 1.5.4.

I'm wondering if there is a way to import more than one image at the same time. I'd need to insert let's say 10 images from a folder containing a lot more.. for example 100 images.
Now I have to create 10 frames, ok this is a quick stuff (create the first, then ctrl+c, ctrl+v to copy and paste the empty frame 9 times) ... But for each frame I have to insert an image at a time, so by select a frame, click "Ctrl+I", find one of the 10 images, select it and press "Ok".

It would be faster if there were a way to click something like "insert multiple images", open a selection window, select my 10 images and press ok to  automatically create the ten frames containing the selected images one per freme.
Is there a way?

Thanks in advance!
Bye

dragonfly

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
  • Scribus User
Re: Import multiple images
« Reply #1 on: July 25, 2018, 01:47:40 pm »
I see in Scripter > Scribus Scripts there is a script .. DirectImageImport.py.
I have just tried it with a single image import.
I imagine this python script could be used as a template to loop through multiple images
instead of just one image.

scriber

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
  • Scribus User
Re: Import multiple images
« Reply #2 on: July 25, 2018, 02:30:23 pm »
Tried! It works fine but could be improved in two points:
- when selection dialog appears it opens a default path, would be more useful if it remembered the previous path opened the last time (if you have to insert 10 images or more, this little improve can speed up a lot...)
- I had to set image imported to fit the frame and then adapt frame to the image, so I can resize frames as I need... they were in a free scale mode for default. Maybe this can be set in some other preferences config...

Anyway, yes: It could be used as a base to create an other script improved by adding a way to select more images and set the frame/image mode one time for all them when they are imported. Thanks for your answer!  :)

dragonfly

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
  • Scribus User
Re: Import multiple images
« Reply #3 on: July 25, 2018, 02:41:07 pm »
You might be interested in a useful tool I am experimenting with to automate actions.

Actiona you can find here ..

https://jmgr.net/

I can explain how to loop through to import multiple images in a "Scribus macro".

utnik

  • Hero Member
  • *****
  • Posts: 1217
  • Karma: 14
Re: Import multiple images
« Reply #4 on: July 25, 2018, 03:43:52 pm »
hi scriber   

it may depend on the os or file manager, but on macOS i can just grab a selection of images in a finder window and drag them to a page of a scribus document. when i drop the images, scribus creates the needed frames automatically – might be worth trying…   

utnik

scriber

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
  • Scribus User
Re: Import multiple images
« Reply #5 on: July 25, 2018, 04:14:29 pm »
What timing!  :D
Just tried to select  some images from Dolphin file manager and grab them into a page of my scribus document, I decided to let you know, but you were faster than me!  ;)
As regards my OS, I'm using Slackware GNU/Linux 14.2 with KDE-4.x as Desktop Environment and I tested it by opening my images path with Dolphin File Manager, then grab then into Scribus document.
Very easy and quick!

Thanks all for your answers!
« Last Edit: July 25, 2018, 04:17:55 pm by scriber »

dragonfly

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 0
  • Scribus User
Re: Import multiple images
« Reply #6 on: July 26, 2018, 01:04:53 pm »
It may be that you have solved your problem by dragging in images as you describe above.

However I add this other approach using ScribusGenerator.py.

Basically ScribusGenerator.py is placed in the scripts folder.
Then a template document is created with image frames created for each of your 100 or so images to be imported.
The file name for each imageframe is specified as %VAR_name% as explained here.
https://github.com/berteh/ScribusGenerator#dynamic-images

Then you create a csv file which is a list of image files to be imported.
Run ScriptGenerator.py and your document is created with imported images.