How can I combine multiple images, such as base image with logo and number of digits images to display graphical counter with pageviews count, updated dynamically?
It should be very fast, with thousands of renders per second. User should see counter image without Javascript and with single img tag.
I prefer to implement that counter with Python using PIL library, but other solutions welcome as well.
Precompute for the given background the image of a single digit (for each digit 0 … 10) at each digit position.
Then to create arbitrary number you only have to paste the correct images next to eachother, but you won’t have to do any alpha blending. Therefore this must be more efficient.
Also, if certain page counts are more common (e.g. page counts < 10000) you might want to precompute these (10000) complete counter images to serve those directly.
EDIT:
You can do this with python PIL, or any other method. If you have a specific difficulty with PIL then please ask a more direct question about the problems you have encounterd.