I am trying to read a a tiff file that is in Little endian format. In the Image File directory the first tag value is 0100(in hex). When i am trying to read these 2 bytes it gives the following result.
>readChar(fptr,nchars=2,TRUE)
[1] ""
But when i read single bytes then it correctly gives
>readChar(fptr,nchars=1,TRUE)
[1] ""
>readChar(fptr,nchars=1,TRUE)
[1] "\001"
>
Here's a tiff file:
You can read it in as raw bytes using
readBin
.You may prefer to read it in using
tiff::readTIFF
.Then you can include it inside your other plots using
rasterImage
.