Vektor Gambar

library(magick)
## Warning: package 'magick' was built under R version 4.2.3
## Linking to ImageMagick 6.9.12.3
## Enabled features: cairo, freetype, fftw, ghostscript, heic, lcms, pango, raw, rsvg, webp
## Disabled features: fontconfig, x11

Semua fungsi dalam sulap telah divektorisasi untuk mendukung bekerja dengan lapisan, komposisi, atau animasi.

Metode dasar standar [ [[, c()dan length()digunakan untuk memanipulasi vektor gambar yang kemudian dapat diperlakukan sebagai lapisan atau bingkai.

# Download earth gif and make it a bit smaller for vignette
earth <- image_read("https://jeroen.github.io/images/earth.gif") %>%
  image_scale("200x") %>%
  image_quantize(128)

length(earth)
## [1] 44
earth

rev(earth) %>% 
  image_flip() %>% 
  image_annotate(" no flat earth ", size = 20, color = "white")