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:
pew
2024-01-09 23:38:18 +00:00
committed by GitHub
parent fb5fcbafc1
commit 658ec20b37
3 changed files with 32 additions and 0 deletions

View File

@@ -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
View 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;

Binary file not shown.