1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

Utilities: Add new utility for converting images to raw bitmap binaries

I used this utility to check if the possible TGA images' cases for
different origins (explictly the Y origin) are generating the same
bitmap, as I felt that my eyes are not a good-enough measurement tool
for this kind of task.
This might be useful in the future for testing other implementations so
I rather have this nice utility in our codebase.
This commit is contained in:
Liav A 2023-01-14 03:30:09 +02:00 committed by Jelle Raaijmakers
parent b2626d3bc1
commit 01db302a33
3 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,23 @@
## Name
image2bin - convert an image to a binary bitmap
## Synopsis
```**sh
$ image2bin <path-to-image>
```
## Description
`image2bin` uses LibGfx to decode a specified image to a raw bitmap, so it could be stored
in a raw binary format for further examination.
## Examples
```sh
# Convert a PNG image to raw bitmap
$ image2bin example.png > example.bin
# Convert a JPG image to raw bitmap
$ image2bin another_example.jpg > another_example.bin
```