Unable to export `cimg` array as a tiff file using `imager` in `R`

84 Views Asked by At

I am trying to export/save some cimg arrays as tiff images in R using the package imager.

However, the output is not in the correct format. How to fix this ?

library(imager)
library(tiff)

tifftest <- imager::load.image(file = system.file("img", "Rlogo.tiff", package="tiff"))
plot(tifftest)

enter image description here

imager::save.image(im = tifftest, file = "test.tiff", quality = 1)

enter image description here

The link to the raw tiff file in the above example is below.

https://github.com/s-u/tiff/raw/master/inst/img/Rlogo.tiff

0

There are 0 best solutions below