In Progress

Convert txt to png

We are a small, independent photography company specialising in junior team sports photography.

We have developed all our tech systems in-house using a series of shell (bash) scripts. We use Macs (Mavericks), and the bulk of our image processing is done through a loosely coupled collection of modules based on ImageMagick.

One task we complete manually is the conversion of a text file (people's name) into a transparent background png to be overlaid on the rest of the print. We are looking to automate this process. The final product should:

-- receive parameters such as the text file (including tabs), font, colour, minimum/maximum font size (eg 9.0/14pt), box size (based on photo orientation)

-- automatically fit the text to box, aligning tabs (Back Row: etc), auto text size, line breaks (not breaking names) on commas if needed, line spacing (leading)

-- produce a transparent png based on the inputs that displays the txt file contents 'beautifully'

Things that I would build on the script in the future:

-- ability to select an alternative font if the best fit font size is too small (under [url removed, login to view]) - eg Arial to Arial Narrow

-- ability to alter box size based on input logic if the best fit font size was too small - eg make the box a little bigger and the photo a little smaller

What we have tried:

-- LaTeX appears to be an obvious choice. Tab stops were do-able, but the background transparency was problematic. Requires a heavyweight install

-- ImageMagick has a text resize functionality, but can't do tabs. Could still be an option if two text pngs were outputted with the same font size could be combined

-- wkhtmltoimage appears to be the best option, and is lightweight. Can be styled easily with css, but I still can't get it right enough

There is no restriction on how this is done, other than it should be fast and run on the systems specified above.

I have attached some samples of outputs that we do manually.

Skills: Anything Goes, LaTeX, Mac OS, Python, Shell Script

See more: wkhtmltoimage, shell, wkhtmltoimage transparent, png txt, convert png txt, convert png image text, shell bash, make image background transparent, convert font, bash shell scripts, bash file, sports photography, get photography, txt, to png, tech house, python rest, python auto, photography company, bash scripts, convert python text file, small python task, transparent text box, png resize, resize css background

About the Employer:
( 0 reviews ) Queanbeyan, Australia

Project ID: #5324703

Awarded to:


I've created programs to do custom text layout using the os x text layout apis in Quartz/Core Graphics, so i can create a small program to generate your image with beautifully rendered text. I've already done the ba More

$300 AUD in 5 days
(10 Reviews)

12 freelancers are bidding on average $590 for this job


Dear there This seems an interesting job. Could you please send me some example of input and output, so I could review? I could work on immediately Thanks & B/R

$700 AUD in 7 days
(20 Reviews)

Hi! I am proficient Python developer. I am very familiar with image processing and I had many similar projects. I can deliver project made in Python for you

$555 AUD in 1 day
(12 Reviews)

We are ready to start your project as soon as possible, please open chat. Dear Client, Hope you are doing well! We have gone through your requirement and we understand that you are looking for highly skilled, More

$721 AUD in 22 days
(9 Reviews)

Dear responsible person, This text drawing over transparent png can be achieved with Python in multiple ways. I am mostly experienced with Python and Qt (PyQt). This way I have implemented similar task for this comp More

$1111 AUD in 20 days
(2 Reviews)

A proposal has not yet been provided

$777 AUD in 20 days
(3 Reviews)

That's nice real world problem! I think I would try to use the power that is in the browser, that is: PhantomJS + JavaScript + CSS. There's a lot that can be done with that (not to mention one can see it work on rea More

$722 AUD in 14 days
(0 Reviews)

Dear photomob I am experienced LaTeX user and I also know bash scripts. As you say LaTeX is an obvious choice and I think that it is a right choice if you want a proper text formatting. The background transparenc More

$333 AUD in 10 days
(0 Reviews)

I am new to freelancer. Hence you may not see any ratings. I am a general programing enthusiast and thought that this may be a good way to put my skills to good use. This is a simple task. I already have a basic wor More

$555 AUD in 7 days
(0 Reviews)

A proposal has not yet been provided

$500 AUD in 15 days
(0 Reviews)

Hi, I can solve your task. I can handle this problem using a python script with high quality documentation and testing. Best regards Euripedes

$250 AUD in 10 days
(0 Reviews)

I will automate your all processes in a smooth way and more faster with accuracy. If you are interested I can submit you my methodology how I will achieve your goals. Thanks

$700 AUD in 14 days
(0 Reviews)

Hello, I read your project and I can help you. I can write you a java program that would be able to do what you want. I look forward to hearing from you to discuss this project further. Clay P

$555 AUD in 10 days
(0 Reviews)