pngbot is a bot designed to combine two png images in one so that it appears as the 1st image in preview and the 2nd in fullsize view. This is possible due to the fact that image viewers usually change the background color between white (or some shade of white) for thumbnail to black in fullsize view states. I've observed that it works on twitter, tumblr, and also on iPhones!
examples:
ex:
Click to view alternate Image
Operation:
- First it checks for new mentions and downloads the image attachments to the working directory as png0.png and png1.png.
- Next it will call the shell script to do the imagemagick conversion and composite commands. If the mention provides only one image, it uses default.png as the 1st image.
- Mentions are logged to a file called mentionlog.txt in the working directory.
APIs/ Prerequisites:
- Twitter (tweepy) https://github.com/tweepy/tweepy
- Tumblr (pytumblr) https://github.com/tumblr/pytumblr
- Python - Tested with version: 2.7.5
- ImageMagick - Tested with version: 6.7.8.9-10