24
Forside
3y

As a follow-up to my comment on this rant: https://devrant.com/rants/1029538 I want to share with you my new project: BinToBmp!

It converts any file into a beautiful bitmap image illustrating all bytes as pixels. Each byte indicates an index to a color table (very happy bitmap makes it this simple).
Useful? No. Fun to make? Hell yeah!

Take a look at it on my github page:
https://github.com/Forside/BinToBmp
Download:
https://github.com/Forside/...

Print your favorite song and hang it on the wall or make a shirt from your latest compiled application. So many possibilities!

More infos in the readme.
Updates coming soon :)

P.S.: The image displays the converted jar.

Comments
  • 16
    print it on a aluminium plate and sell it as art series to an art gallery

    "No. 1010111, Day 64748, git commit: i hate my job" by Mr. Forside, 3x3 meters, price $ 50'000

    "No. 1100101, Day 64749, git commit: Debugging making progress" by Mr. Forside 3x3 meters, price $ 50'000
  • 2
    This is a cool idea. A while ago I thought of the same thing, except works a bit differently.

    I'll post it here on DevRant I'd I finish it!
  • 3
    Nice project! It's some kind of Steganography!
  • 2
    🤔
    Could you convert the bitmap back to the data?
  • 4
    @PrivateGER Added to my todo list! Will be easy, the original bytes are more or less just copied into the image.
  • 0
    @Forside No compression?
  • 4
    @PrivateGER Hah no, didn't want to fiddle around with that. I'm happy it works the way it is for now. Took me a few nights until I got the bmp format structure right.
  • 3
    Favorited x.x

    I'll see if I can do anything with this... ^~^
  • 2
    @Cyanite Tell me when you find a good use for it :)
  • 2
    Seriously though... I came across this by accident in my firecoder app by encoding as utf-8 and saving as a .bmp. I bet I could do a minor edit to the way saving works (more like a patch) and have it save the encrypted text to an image.
  • 1
    @Forside

    Sadly, I doubt I could use your project (unless it's Python code).

    I think I can use this idea, but not in a dedicated way. More as an option.
  • 1
    @Cyanite Can't your machine run java/kotlin?
  • 1
    @Forside

    I want to use it for an existing Python project.

    Would be easier and cleaner to just rewrite the code in Python.

    I know how to do it (I think...)

    Like I said, I did it by accident already.
  • 1
    @Cyanite Ah I see. The code is quite small and should be fairly easy to port though as long as python can handle single bytes well (don't know much about python).
  • 1
    @Forside

    It does. As a byteArray or byte-compatable String.

    My utility, Firecoder, is an command-line app for encrypting ascii/unicode text/data into ascii encryptions using procedual cyphers and even user-configurable encryption algorythms(I call them sequences).

    Edit before posting: It seems that my encryptions use too many latin characters which remain as characters and not valid bytes after converting to utf-8...
  • 2
    Ok weird question, if you can convert it back and forth, is it possible that a virus detector might look at the bytes and flag it?
  • 1
    @Cyanite lol, I know what application you're referring to
  • 1
    @iSwimInTheC Flag what exactly?
  • 1
    @Forside

    My thoughts exactly.

    It would just see it as a text file with a .bmp extension.
  • 1
    @Forside say I decided to convert a virus into a bmp. Will an anti-virus detect it
  • 0
    @iSwimInTheC Ah, well I don't know how exactly heuristic detectors work, but as the bytes in the bitmap are exactly the same as in the original file, like a malware, just with a little offset, this could totally happen.
  • 1
    @Cyanite it'd be a fun way to store data
  • 1
    @Forside if you want to try this, try the EICAR file.
  • 0
    @stop Interesting idea! Didn't know about this. Will give it a try.
  • 0
    @stop Eicar is not found inside the image. But even adding one character to the beginning of the text stops it from being detected.
  • 0
    @Forside which scanner did you use?
  • 1
    I just finished doing something similar, except instead of using a bitmap with color table, I read 4 bytes and convert them to RGBA8888 and then display it ot the screen.
    It's all here: https://github.com/draganczukp/...

    To run: ./gradlew run [path to file]
    or
    java -jar $(pwd)/desktop/build/libs/desktop-1.0.jar
  • 0
    @killermenpl example image please 🙂
  • 0
    @heyheni Check the readme in the repo. There is an image generated from the .jar file.
  • 0
    @killermenpl thank you! looks indeed more colorful. 👍
  • 1
    @killermenpl Also thought about that, but decided against it, because I wanted each byte to represent a Pixel.
  • 0
    @stop Just used Windows Defender. It directly alarmed me when I saved the text file, so that seemed enough. Have nothing else on PC and didn't want to waste more time on that.
Add Comment