Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should unlist for a list of image-magick work like image_join? #406

Open
KaiAragaki opened this issue Oct 11, 2024 · 0 comments
Open

Should unlist for a list of image-magick work like image_join? #406

KaiAragaki opened this issue Oct 11, 2024 · 0 comments

Comments

@KaiAragaki
Copy link

It's been alluded to previously (#158, #330), but there seems to be a certain amount of confusion with lists of images vs a vector of images. I was recently confused by this too, as I expected image_vector and image_list to yield similar results:

library(magick)
image_vector <- c(wizard, wizard)
image_list <- unlist(list(wizard, wizard))

image_vector
#> # A tibble: 2 × 7
#>   format width height colorspace matte filesize density
#>   <chr>  <int>  <int> <chr>      <lgl>    <int> <chr>  
#> 1 GIF      480    640 sRGB       FALSE    99674 72x72  
#> 2 GIF      480    640 sRGB       FALSE    99674 72x72  

image_list
#> [[1]]
#> # A tibble: 1 × 7
#>   format width height colorspace matte filesize density
#>   <chr>  <int>  <int> <chr>      <lgl>    <int> <chr>  
#> 1 GIF      480    640 sRGB       FALSE    99674 72x72  
#> 
#> [[2]]
#> # A tibble: 1 × 7
#>   format width height colorspace matte filesize density
#>   <chr>  <int>  <int> <chr>      <lgl>    <int> <chr>  
#> 1 GIF      480    640 sRGB       FALSE    99674 72x72  

image_join works great, but I found this behavior a little surprising.

Thanks for the great package!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant