Replies: 2 comments 1 reply
-
For png it looks like the first 4 bytes are 89 50 4E 47 (maybe the first one changes but the last three read PNG. locate the positions in your file that contain the chars and place the png pattern (just copy it from the png.hexpat file and paste it in your code) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. I should probably have been more precise. I got this working when using just a normal PNG file (because the file starts at memory position 0x00). I don't know the pattern language yet but it looks to me from the PNG hexpat, that it requires the whole memory to correspond to one PNG file and that the PNG file has to start at memory position 0x00. However, I did not get it working when the PNG file is embedded within some other data structure. Also, the end goal would be to find all occurences automatically and apply the hexpat. I guess I would need to write custom pattern language code to search for occurences of the magic bytes and apply the PNG hexpat in all of the places? |
Beta Was this translation helpful? Give feedback.
-
Hi,
first of all thanks for anybody involved in this project. I just found this editor and think its amazing.
So far, I have one use case that I have not figured out in ImHex. I have a large binary file of unknown format that I try to understand. Somewhere in the structure of this unknown protocol there are some PNG files. It would help me a lot, if I could apply the PNG hexpat to the whole file, so I can see which sections of the file contain PNG files, so I can concentrate on the surrounding areas or the other parts of the file. I would greatly appreciate if someone could nudge me in the right direction or tell me if that is even possible.
Beta Was this translation helpful? Give feedback.
All reactions