Looking to create series of images via text/csv input
Posted: 2016-10-04T09:15:37-07:00
Hey all! I'm new to ImageMagick and it seems like it's a great solution to a process at work that's becoming a bottleneck as we grow. I read through a bunch of documentation and found a couple of things that will assist in this, but I can't seem to find exactly what I'm looking for in terms of input.
Here's the process in full:
When we get a new customer onboarded we need to create a generic logo for them. These logos are always the same pixel dimensions and always use the same font/font color; the only thing that differs between each one is the name of the customer. This name can vary quite a bit in length, from say 6 characters all the way up to 100 or even slightly more.
Because of this name variance, the font size needs to vary so that the name of the customer fits appropriately. There also should be line breaks where appropriate. I found that a lot of this can be solved with Best Fit Labels in the ImageMagick documentation.
What I'm struggling to find is where I can have an input file -- be it a .txt or .csv -- with a list of customer names, and then ImageMagick will read that file in, and create an image for each one of those customers, taking into account the length of the name, creating a best-fit label within the pixel dimension constraints, and then output each image with a meaningful file name (for example the customer ID# or something so it can be uploaded easily).
Is it possible to do what I want without diving into something like an API? I've dabbled in Python and can use it if needed, just wanted to see if there was a simple solution that can easily be run on other machines as this won't be executed on mine.
Here's the process in full:
When we get a new customer onboarded we need to create a generic logo for them. These logos are always the same pixel dimensions and always use the same font/font color; the only thing that differs between each one is the name of the customer. This name can vary quite a bit in length, from say 6 characters all the way up to 100 or even slightly more.
Because of this name variance, the font size needs to vary so that the name of the customer fits appropriately. There also should be line breaks where appropriate. I found that a lot of this can be solved with Best Fit Labels in the ImageMagick documentation.
What I'm struggling to find is where I can have an input file -- be it a .txt or .csv -- with a list of customer names, and then ImageMagick will read that file in, and create an image for each one of those customers, taking into account the length of the name, creating a best-fit label within the pixel dimension constraints, and then output each image with a meaningful file name (for example the customer ID# or something so it can be uploaded easily).
Is it possible to do what I want without diving into something like an API? I've dabbled in Python and can use it if needed, just wanted to see if there was a simple solution that can easily be run on other machines as this won't be executed on mine.