dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

issue with reading svg images in Ubuntu 16 #109

Open matiasandina opened 4 years ago

matiasandina commented 4 years ago

I am facing issues when trying to read svg images in ubuntu 16 but not in ubuntu 18.

download.file("https://www.r-project.org/logo/Rlogo.svg", destfile = "rlogo.svg")
file <- list.files(pattern = "rlogo.svg", full.names = TRUE)
im <- load.image(file)

This works on 18, but it does not work in xenial.

The error that I get is:

Aborted (core dumped)
sh: 1: gm: not found
Error in load_image(file) : 
  cimg::stderr(): Reference to 'stderr' stream not allowed in R mode ('cimg_use_r' is defined)
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.4.0   stringr_1.4.0   dplyr_0.8.3     purrr_0.3.2     readr_1.3.1    
 [6] tidyr_0.8.3     tibble_2.1.3    ggplot2_3.2.1   tidyverse_1.2.1 imager_0.41.1  
[11] magrittr_1.5   

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5 haven_2.1.1      lattice_0.20-38  colorspace_1.4-1
 [5] generics_0.0.2   vctrs_0.2.0      rlang_0.4.0      pillar_1.4.2    
 [9] glue_1.3.1       withr_2.1.2      modelr_0.1.5     readxl_1.3.1    
[13] jpeg_0.1-8       munsell_0.5.0    gtable_0.3.0     cellranger_1.1.0
[17] rvest_0.3.4      rsvg_1.3         broom_0.5.2      Rcpp_1.0.2      
[21] scales_1.0.0     backports_1.1.4  magick_2.1       jsonlite_1.6    
[25] hms_0.5.1        bmp_0.3          png_0.1-7        stringi_1.4.3   
[29] tiff_0.1-5       grid_3.6.1       cli_1.1.0        tools_3.6.1     
[33] lazyeval_0.2.2   crayon_1.3.4     readbitmap_0.1.5 pkgconfig_2.0.2 
[37] zeallot_0.1.0    xml2_1.2.2       lubridate_1.7.4  assertthat_0.2.1
[41] httr_1.4.1       rstudioapi_0.10  R6_2.4.0         igraph_1.2.4.1  
[45] nlme_3.1-141     compiler_3.6.1