Skip to main content
severinw53785042
Participating Frequently
March 11, 2024
Question

Random Image Distribution and Placement

  • March 11, 2024
  • 2 replies
  • 1134 views

Hey there,

 

For a school project I'd like to distribute and place about 200–250 images randomly (in size and position) onto an InDesign spread. I assume that it's a very basic script but I have almost no knowledge about InDesign-scripting so I'd be very glad for any kind of help.

Attached you can find an example of how I want to distribute them by script. Until now it was made manually.

 

Thanks very much in advance and really looking forward to hearing from you,

xx

This topic has been closed for replies.

2 replies

m1b
Adobe Expert
March 12, 2024

Hi @severinw53785042, can I just point out, for the benefit of anyone having a go at coding this, that what you show in your screenshot is not a simple random distribution. *Far* from it.

 

Some notes:

1. There are no "gaps"—or almost none—where the canvas is empty.

2. There seems to be a limit on the number of "levels of overlap"—it looks like, at most, no more than, maybe, four or five images can overlap at any given point—and those "maximal overlay" places are very rare, too—the vast majority of points are one or two levels deep.

3. Nowhere is there an image that *isn't* overlapped by several of its neighbours.

 

So any distribution algorithm will have to consider these things I believe, and would not be a simple random distribution.

- Mark

brian_p_dts
Adobe Expert
March 11, 2024

Using the Content Collector tool to place the images yourself randomnly would be faster than the time it would take anyone to write a script to do that. It's not exactly simple, as you'd need an algorithm to account for even spread in the randomness. 

severinw53785042
Participating Frequently
March 11, 2024

Thanks for your answer, really appreciated! As it's for my bachelor thesis I'd like to have a lot of iterations and image combinations and then choose from one. So it would be much easier to once invest time into a functional script and then generating compositions by mouse-click.