an image bot that exploits png transparency quirks.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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!

I first encountered this effect via twitter user @taki_bump, but as of 2018, the account seems to have been deleted or renamed?
Click to view alternate Image


  • 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: