mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +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:
parent
b2626d3bc1
commit
01db302a33
3 changed files with 63 additions and 0 deletions
23
Base/usr/share/man/man1/image2bin.md
Normal file
23
Base/usr/share/man/man1/image2bin.md
Normal 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
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue