Ah, I didn't realise that. Ok, that helps, somewhat, but FF FE = 65279 doesn't it, not 65534, which doesn't correspond to the true length of the APP1 segment from what I can tell.
I just want to delete 12 bytes whenever there is a FF E1 FF FD, since without these, the TIFF image should be intact, and represent the raw thermal data (or perhaps simply the temperature data).