Pixture
looks really awesome, and can be super useful with parameterized reports. I'm looking to implement pixture
in a museum setting where I have a large number of images. However, I'm having trouble executing pixgallery()
with local files. The function works flawlessly with URL's but does not seem to work with local files. Hopefully I'm not missing something obvious.
Local images example not working
Following the Pixgallery article, I use list files to get a list of images with relative paths and pass these to pixgallery()
. However, the function returns blank squares.
paths <- list.files("../images", full.names = TRUE)
paths
[1] "../images/brittany-1937051_960_720.jpg"
[2] "../images/lostmarch-menhir.jpg"
[3] "../images/Menhir_du_Champ_Dolent.jpg"
[4] "../images/Organ_Mountains-Desert_Peaks_National_Monument_(17717943249).jpg"
![image](https://user-images.githubusercontent.com/62002677/178030383-d4044293-bcc6-4060-90b0-9935adeb132c.png)
The issue seems to be isolated to pixgallery()
because I can display images using functions from other libraries like imager
with plot
.
im<-load.image(paths[2])
plot(im)
![image](https://user-images.githubusercontent.com/62002677/178030464-11cb42a4-e6f3-4db1-bc44-dca2e1342ea8.png)
Sample local images not working
Additionally, the local images example that is based on sample images from the package also does not work. When I generate this set of paths
, I can also display these from the paths list using imagr
with plot
.
paths <- list.files(system.file("extdata/images", package="pixture"), full=TRUE)
paths
Just as in the article example, the output is six blank squares.
![image](https://user-images.githubusercontent.com/62002677/178027891-615a2f22-014c-4096-826c-d32eef080cb4.png)
However, I can plot items from the list.
im<-load.image(paths[6])
plot(im)
![image](https://user-images.githubusercontent.com/62002677/178031125-20263ed6-fc15-4ad9-9f54-f31fa52e9f91.png)
Any thoughts on how to address this? Is it something at my end, or is there another way to approach this? Thank you for any insight you might have.
sessionInfo
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] imager_0.42.13 stringr_1.4.0 purrr_0.3.4 magrittr_2.0.3 pixture_0.0.2.2001
loaded via a namespace (and not attached):
[1] igraph_1.3.1 Rcpp_1.0.8.3 rstudioapi_0.13 knitr_1.39 here_1.0.1 xtable_1.8-4
[7] R6_2.5.1 jpeg_0.1-9 rlang_1.0.3 fastmap_1.1.0 tools_4.2.0 xfun_0.30
[13] png_0.1-7 cli_3.3.0 htmltools_0.5.2 ellipsis_0.3.2 rprojroot_2.0.3 yaml_2.3.5
[19] digest_0.6.29 lifecycle_1.0.1 bmp_0.3 shiny_1.7.1 later_1.3.0 htmlwidgets_1.5.4
[25] promises_1.2.0.1 mime_0.12 tiff_0.1-11 readbitmap_0.1.5 stringi_1.7.6 compiler_4.2.0
[31] jsonlite_1.8.0 httpuv_1.6.5 pkgconfig_2.0.3