Convert image size to integer

This commit is contained in:
Ryan Timpe
2018-05-05 13:10:04 -04:00
parent 01229b0874
commit 130362680a

View File

@@ -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)