Giter Club home page Giter Club logo

pngbin's Introduction

Run on Repl.it

What is PngBin?

The name PngBin comes from an image format file extension PNG (Portable Network Graphics) and the word Binary. An image produced by PngBin will have every property like a normal PNG image except that when viewed by an image viewer, It will appear broken and noisy (which is normal for any PngBin images). By utilizing the lossless data compression feature, A PNG image can be made to contain arbitrary binary data (this is why PngBin image can look noisy) without losing a single bit of information, Unlike JPEG image, which has lossy compression and cannot reverse its data to the original form.

apple noisy
Normal PNG Image PngBin Image Example

Why is PngBin?

There are a few fun applications I can think of while working on this project. One of which is you can make most image hosting act like a file hosting by loading your files (video, music, executable, pdf, etc.) or even images to a PNG image using PngBin, then upload those loaded images to the image hosting. This method uses the advantages of most image hosting, like direct link and high speed download, to access your file easier and faster than any average free file hosting. Or you can upload them to a site where posting arbitrary files is impossible and only images (especially PNG images) are allowed.

Visit these Jupyter notebooks for this application demo.
Live demo example can be visited here

The possibility is there and it's up to you to decide. And of course, contribution is appreciated.

How is PngBin?

It's fine, thanks for asking. JK ๐Ÿ˜
As mentioned above, In general, PngBin can load any data to a PNG image file which makes almost all the images it produces look broken and noisy unlike normal PNG images which only allow a relatively small subset of binaries to be contained so that the image would make sense.

There are 2 main classes, Writer which converts any binary data to an PngBin image and Reader which does the opposite. These 2 classes also have their corresponding extensions EncryptWriter and DecryptReader, respectively. They are used to obscure/reveal data inside PngBin images with AES cipher. All the previously mentioned classes can convert a single image at a time which can be inconvenient in some cases, that's why ChainWriter and ChainReader are made to convert your data and split/join the images into/from multiple small images.

Requirements

  • Python 3.6+
  • cryptography (Write/Read Encrypted PngBin images)
  • flask, requests (WebUI)
  • httpx (Uploader)
  • jupyterlab (For running Jupyter notebooks)

Usage

Look for usage, examples and more details on Jupyter notebooks demo.

The following video demonstrates an example of how PngBin is used.
PngBin Usage Demonstration

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.