Giter VIP home page Giter VIP logo

pngbot's Introduction

pngbot

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:

i first encountered this effect via twitter user @taki_bump
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:


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. :)

pngbot's People

Contributors

vgan avatar

Watchers

Joel Kirchartz avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.