The reference.ToBitmap does confuse me a bit. I started in one direction (converting to a bitmap and parsing the bitmap pixel by pixel), but execution speed was (predictably) horrendous.
I then went the bytearray route in parallel and was able to manually parse it that way with good result. When I went back and deleted the bitmap code it suddenly stopped parsing correctly. It turns out that for some reason when I make the call reference.ToBitmap(Tiff) it changes the output of reference.ToByteArray(). If I change it to a different argument (jpg for example), the ByteArray parses completely differently. So, I just make the call and throw away the resulting bitmap.
I'll ping you and get you my code. Thanks for all the help.
I then went the bytearray route in parallel and was able to manually parse it that way with good result. When I went back and deleted the bitmap code it suddenly stopped parsing correctly. It turns out that for some reason when I make the call reference.ToBitmap(Tiff) it changes the output of reference.ToByteArray(). If I change it to a different argument (jpg for example), the ByteArray parses completely differently. So, I just make the call and throw away the resulting bitmap.
I'll ping you and get you my code. Thanks for all the help.