mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
patterns: Added visualizers to image patterns (#117)
* Added image visualizers to image patterns that were supported * missing include files * Small style fixes --------- Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma MIME image/bmp
|
||||
#pragma endian little
|
||||
#include <std/mem.pat>
|
||||
|
||||
struct BitmapFileHeader {
|
||||
u8 bfType[2];
|
||||
@@ -31,6 +32,7 @@ struct Colors {
|
||||
};
|
||||
|
||||
struct Bitmap {
|
||||
u8 data[std::mem::size()] [[no_unique_address, hidden]];
|
||||
BitmapFileHeader bmfh;
|
||||
BitmapInfoHeader bmih;
|
||||
|
||||
@@ -46,6 +48,6 @@ struct Bitmap {
|
||||
u8 lineData[bmih.biSizeImage];
|
||||
else
|
||||
u8 lineData[bmfh.bfSize - $];
|
||||
};
|
||||
} [[hex::visualize("image", this.data)]];
|
||||
|
||||
Bitmap bitmap @ 0x00;
|
||||
|
||||
Reference in New Issue
Block a user