diff --git a/README.md b/README.md index 141c22c..a59c76e 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/patterns/ras.hexpat b/patterns/ras.hexpat new file mode 100644 index 0000000..a2709a9 --- /dev/null +++ b/patterns/ras.hexpat @@ -0,0 +1,31 @@ +#pragma author Fl3ch4 + +#pragma MIME image/webp +#pragma endian big + + +#include +#include + + +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; diff --git a/tests/patterns/test_data/ras.hexpat.ras b/tests/patterns/test_data/ras.hexpat.ras new file mode 100644 index 0000000..b02ef30 Binary files /dev/null and b/tests/patterns/test_data/ras.hexpat.ras differ