Coder Social home page Coder Social logo

bytes-to-bitmap's Introduction

Bytes-To-Bitmap

Visualise the bytes of any file as a bitmap. Useful for visually inspecting for corrupt files.

Why?

Sometime files may be corrupt, containing large runs of 0'd bytes. Maybe you do not know whether files are corrupt, and would like to be able to quickly inspect the files for said corrupt blocks.

Maybe you just want to view your PhD thesis as raw bytes?

Usage

Assuming that Python is correctly installed, you can simply click on the python file. A dialogue should pop up asking you to select a file to process.

If you prefer to run in a Terminal so that you can use the script to process a large number of files, run the script like this:

python bitMapMaker.py Desert.jpg True outPutFile.bmp

The second argument indicates whether the image should be scaled to 1024*768. If the user does not provide arguments then the gui will prompt the user for file selection.

A corrupt jpg is included for demonstration purposes.

Why the blue bar?

Bytes from the input file are represented as black and white pixels. Sometimes due to rounding, we must fill in some pixels, but there are no remaining bytes in the input file. We therefore represent these pixels using a blue colour.

References

Writing a bitmap without using an external library requires manually constructing an appropriate header. I used the following code to do so: http://pseentertainmentcorp.com/smf/index.php?topic=2034.0

bytes-to-bitmap's People

Stargazers

Akash Sullia avatar

Watchers

Gregory Bigwood avatar James Cloos avatar

bytes-to-bitmap's Issues

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.