Git Product home page Git Product logo

pixture's Introduction

pixture

ci_badge codecov lifecycle_badge

pixture is an R package to create HTML image galleries. This can be standalone, included in an Rmarkdown document or in a shiny app. See the project website for more details.

Disclaimer

This R package is offered free and without warranty of any kind, either expressed or implied. I will not be held liable to you for any damage arising out of the use, modification or inability to use this program. This R package can be used, redistributed and/or modified freely for non-commercial purposes subject to the original source being properly cited. Licensed under GPL-3.

Contact

If you have an comments, suggestions, corrections or enchancements, kindly submit an issue on the Github issues page.

2023 โ€ข Roy M Francis

pixture's People

Contributors

enchufa2 avatar royfrancis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pixture's Issues

Question on thumbnails and caption rows below images

Dear Roy,
Thanks a lot for this package. I am trying to make an image gallery working in a shiny app, and it works but I wonder if there is a possibility in your package to load images' thumbnails? It seems that what I am trying to do is very slow to load the images.
Secondly, I have been using ThumbsPlus to create image galleries (see https://plantgallery.bio.gov.sc/Fern.html) with a nice background color, and where I can use information from the data.frame to be displayed below each image. Is there a way to do something similar with R/your package?
You can reply me on [email protected]

Complete use case example?

I'd like to use pixture on several different Rmarkdown sites, but where I will be generating the list of image paths and captions in R code,
and output: may be to html_document, distill, etc.

I'd like to see an actual complete use example of an Rmd file that creates the image gallery.

pixgallery() not working with local images

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

The issue seems to be isolated to pixgallery() because I can display images using functions from other libraries like imager with plot.

library(imager)
im<-load.image(paths[2])
plot(im)

image

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
pixgallery(paths)

Just as in the article example, the output is six blank squares.

image

However, I can plot items from the list.

im<-load.image(paths[6])
plot(im)

image

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

Center gallery

I've been trying to center the gallery but can't seem to figure it out. I've tried specifying that in my CSS file, but no success.

.html-widget {
    margin: auto;
}

Update package to new R version

Hi there,

I use pixture for my personal website and I really enjoy this package. I have recently updated R and unfortunately pixture is not available for the newest versions of R.

Is there a plan to update the package?

Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.