I have designed a ticket which includes a sequential ticket number (001,002,003…500) and now I have to export each and every ticket number as a separate PNG image.
This is a lot of manual work and I'm asking if there is a plugin or script that I can use to do this automatically – something I can give the text layer to change incrementally then export the image.
EDIT
This is my ticket.
The ticket number is at the left side corner – 2014/001 -> 2014/500
Image size: 2858px by 1000px
The ticket number font is Dirt2 SoulStalker
Best Answer
I think I got it working.
The procedure is that you put the background image (named "background.png", the ticket without the number, but with
2014/
) in a folder, together with the script below. Then, if you run the script (after editing the three lines in the head section):The script produces numbers from
001
to500
(but it can be any number you define in the head section) Subsequently , usingimagemagick
:the script creates (number by number) separate layers (files) with the number in the right position
Notes
You may have to install
imagemagick
:I used this free version of the font. It turned out that in the script, I had to set the absolute path to the font for it to work. I just copied it to
~/.fonts
and used that path. In the head section of the script, set yours.The script:
How to use
Copy it into an empty file, in th head section of the script, set:
and save it as
numbering.py
, together with your background image (2858px by 1000px), namedbackground.png
in one and the same folder.Run it by the command: