mirror of
https://github.com/ryantimpe/brickr.git
synced 2026-01-06 05:39:34 -06:00
Convert image size to integer
This commit is contained in:
@@ -34,6 +34,8 @@ scale_image <- function(image, img_size){
|
||||
mutate(x = as.numeric(gsub("V", "", x))) %>%
|
||||
spread(channel, value)
|
||||
|
||||
img_size <- round(img_size, 0)
|
||||
|
||||
#Wide or tall image? Shortest side should be `img_size` pixels
|
||||
if(max(img$x) > max(img$y)){
|
||||
img_scale_x <- max(img$x) / max(img$y)
|
||||
|
||||
Reference in New Issue
Block a user