pngbot is a bot designed to combine two png images so that they appear as each of the original images in certain situations. this is a quirk (hack?) which surfaces due to the fact that a lot of image viewers change the background color between white for thumbnail to black in fullsize view states. I've observed that it works on twitter, tumblr, and also on iphones!
examples:
ex:
i only managed to replicate the effect through trial and error with photoshop layers/ imagemagick options and much, much coffee...
Operation:
- first it will check for new mentions and download 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
Scheduling via Cron:
(example is for every 5 minutes)
*/5 * * * * your-username python /path-to-your-script/pngbot.py >> /path-to-your-script/pngbot.log 2>&1
To Do:
- get conversion and composite commands working with wand or some other imagemagick python wrapper so I don't need to use a shell script. :)