mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
patterns: Add .ras pattern (#216)
* Add simple .ras file pattern * Update ras.hexpat * Update README.md * Add .ras test file * Update ras.hexpat * Update ras.hexpat * Update ras.hexpat * Update ras.hexpat
This commit is contained in:
@@ -94,6 +94,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
|
||||
| PYC | | [`patterns/pyc.hexpat`](patterns/pyc.hexpat) | Python bytecode files |
|
||||
| QBCL | | [`patterns/qbcl.hexpat`](patterns/qbcl.hexpat) | Qubicle voxel scene project file |
|
||||
| QOI | `image/qoi` | [`patterns/qoi.hexpat`](patterns/qoi.hexpat) | QOI image files |
|
||||
| RAS | `image/x-sun-raster` | [`patterns/ras.hexpat`](patterns/ras.hexpat) | RAS image files |
|
||||
| Shell Link | `application/x-ms-shortcut` | [`patterns/lnk.hexpat`](patterns/lnk.hexpat) | Windows Shell Link file format |
|
||||
| shp | | [`patterns/shp.hexpat`](patterns/shp.hexpat) | ESRI shape file |
|
||||
| shx | | [`patterns/shx.hexpat`](patterns/shx.hexpat) | ESRI index file |
|
||||
|
||||
31
patterns/ras.hexpat
Normal file
31
patterns/ras.hexpat
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma author Fl3ch4
|
||||
|
||||
#pragma MIME image/webp
|
||||
#pragma endian big
|
||||
|
||||
|
||||
#include <std/mem.pat>
|
||||
#include <type/magic.pat>
|
||||
|
||||
|
||||
struct RAS{
|
||||
|
||||
//Magic Bytes
|
||||
type::Magic<"\x59\xa6\x6a\x95"> signature;
|
||||
|
||||
//BE -> px -> mm
|
||||
u32 width [[name("Width")]];
|
||||
u32 height [[name("Height")]];
|
||||
|
||||
//BE
|
||||
u32 depth;
|
||||
u32 length;
|
||||
u32 type;
|
||||
u32 colorMapType;
|
||||
u32 colorMapLenght;
|
||||
|
||||
//Data Viewer
|
||||
u8 image_data[length];
|
||||
};
|
||||
|
||||
RAS header @0x00;
|
||||
BIN
tests/patterns/test_data/ras.hexpat.ras
Normal file
BIN
tests/patterns/test_data/ras.hexpat.ras
Normal file
Binary file not shown.
Reference in New Issue
Block a user