Fork me on GitHub

Py-image-generator settings config


A helpful tool for those in need of a large number of different images, with various sizes. Check out the Github page for the code, my blog post for some insights or just read the instructions on the project page.


Generate your config file

Use the form below to get the code for your config.json file.

Script settings



*"##index" will be automatically replaced with the image index (the first generated image has the index 0, the second has the index 1 and so on). Enabling zfill will automatically pad the index with zeroes, so if you have 100 images, for example, the index values will be 000, 001, 002, etc.




90

*Any color in hex format will do. If you want a random color, write "random" inside the input. If you want to randomly choose between a given set of colors, enter them in the input separated by a comma (eg. "#000000,#FFFFFF,#FF0000")





*For width and height you can either specify a value in pixels (eg. "100"), an interval of values (eg. "100-200" for any random value between 100 and 200) or a list of values separated by commas (eg. "100,200,300") from which a random value will be choosen. If you specify a ratio, you only need to fill a value for either Width or Height, with the missing size being determined automatically based on the given image ratio.


*The text that will be drawn on the image. "##index" will be automatically replaced with the image index, "##width" and "##height" with the width and height (in pixels) of the image.


*The font size in pixels of the text drawn on the image


*Any color in hex format will do. If you want a random color, write "random" inside the input. If you want to randomly choose between a given set of colors, enter them in the input separated by a comma (eg. "#000000,#FFFFFF,#FF0000"). If you want to use the inverted value of the background image, for guaranteed contrast, write "invert" inside the input.



Config file

Click on "Generate" to create your custom config file and then copy the code to config.json.

Text copied to clipboard!