I have no idea what makes you thinking that you can identify the source of some image by capturing some specific pattern. I don't think so. And of course the expression "hex pattern" is absurd: "decimal" or "hexadecimal" is just the artifact of string representation of some numeric data in positional notation using one or another base; none of them really exist in file data, which is always binary. I also cannot believe that hexadecimal can help you to identify the source of the image. Maybe you are talking about some signature part of the
metadata portion of the image file, but then it has nothing to do with "patterns".
Anyway, if you need to capture the bits of the image itself, not metadata, you are doing it wrong. You start from the position 134 of the beginning of the file, but who told you that this is where the image part starts? If you really need to image bits, you can use, for example,
System.Drawing.Bitmap
and
System.Drawing.Bitmap.LockBits
:
https://msdn.microsoft.com/en-us/library/system.drawing.bitmap%28v=vs.110%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/system.drawing.bitmap.lockbits%28v=vs.110%29.aspx[
^].
—SA