Compose image-flow diagrams with captions and arrows
Project description
Progression Picture Pal
PPP is perfect if you want to automate showing progression in images.
pip install progressionpicturepal
Examples
All images generated with the below code with different num_images and max_per_row values to show different behaviour.
from progressionpicturepal import create_flow_diagram
images = [
("example_images/step1.JPG", "\"First you go to the beach\""),
("example_images/step2.JPG", "\"Then you look at a green bush and think about your place in the world\""),
("example_images/step3.JPG", "\"Then you see a red leaf\""),
("example_images/step4.JPG", "\"But then you see a white house\""),
("example_images/step5.JPG", "\"So you look at some bins\""),
("example_images/step6.JPG", "\"And then some more houses\""),
("example_images/step7.JPG", "\"Before finally looking at your foot\""),
]
create_flow_diagram(
images=images,
output_path="flow_output.png",
num_images=6,
spacing=160,
spacing_vertical=100,
max_node_dim=400,
max_per_row=3,
font_size=20,
arrow_padding_v=70
)
Basic
num_images=3
Wrapping with even
num_images=7
Wrapping with odd
num_images=6
max_per_row=3
Advanced
More advanced usage use the FlowDiagram class directly.
images = [
("example_images/step1.JPG", "\"First you go to the beach\""),
("example_images/step2.JPG", "\"Then you look at a green bush and think about your place in the world\""),
("example_images/step3.JPG", "\"Then you see a red leaf\""),
("example_images/step4.JPG", "\"But then you see a white house\""),
("example_images/step5.JPG", "\"So you look at some bins\""),
("example_images/step6.JPG", "\"And then some more houses\""),
("example_images/step7.JPG", "\"Before finally looking at your foot\""),
]
fd = FlowDiagram(spacing=160, spacing_vertical=100, max_node_dim=400, max_per_row=3,
font_size=20, arrow_padding_v=70)
num_images = 6
for image in images[0:num_images]:
fd.add_node(image[0], image[1])
# only put an arrow every second image
for i in range(num_images-1, 2):
fd.add_arrow(i, i+1)
fd.save("flow_output.png")
Sponsorship
Sample images kindly provided by Sam Lewis of https://snaps.samlewis.me .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file progressionpicturepal-0.3.0.tar.gz.
File metadata
- Download URL: progressionpicturepal-0.3.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d432202d4abdabdd60eb6bbc85c606c0b83aa344536413293f1ffd1c08eb50bf
|
|
| MD5 |
b77ade431035e504844a756d854df8b8
|
|
| BLAKE2b-256 |
206a752cffc095c703662aafad70592dfabd0b4a126a4b128207f7d1225e6165
|
File details
Details for the file progressionpicturepal-0.3.0-py3-none-any.whl.
File metadata
- Download URL: progressionpicturepal-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b4e2771753ea9e7b7f11c8afd8ff6ecfb42d89a48dac479893f4b9e3c46517
|
|
| MD5 |
db333ef708a4365bb6d0c9e06cf9b28d
|
|
| BLAKE2b-256 |
30ab464aba8518f95041dc69ec9df9233cc7c8c4cf97cd557f4d653d58621c14
|