Hi,
While reading in images in R using magick::image_read(), I am only interested in the image displayed in the Viewer pane and not the image information displayed in the console. How can I disable the latter?
Hi,
While reading in images in R using magick::image_read(), I am only interested in the image displayed in the Viewer pane and not the image information displayed in the console. How can I disable the latter?
@Shel and welcome on this forum!
All magick functions return magick-image
objects. The information printed by image_scale()
canβt be turned off. But there is a possible workaround! (thanks @jeroenooms)
library("magick")
#> Linking to ImageMagick 6.9.10.23
#> Enabled features: fontconfig, freetype, fftw, lcms, pango, webp, x11
#> Disabled features: cairo, ghostscript, heic, raw, rsvg
#> Using 8 threads
logo <- image_read("logo:")
logo <- image_scale(logo, "400")
print(logo, info = FALSE)
# or with the pipe
image_read("logo:") |>
image_scale("400") |>
print(info = FALSE)
Created on 2021-10-22 by the reprex package (v2.0.0)
I hope this helps!
Oh wow!! That was very fast β¦ and it works. Thank you