How to work with images

library(panstarrs)
library(magick)
#> Linking to ImageMagick 6.9.12.98
#> Enabled features: fontconfig, freetype, fftw, heic, lcms, pango, raw, webp, x11
#> Disabled features: cairo, ghostscript, rsvg
#> Using 4 threads

Example 1

Plot color image of the Antennae galaxies

coords_antennae <- ps1_mast_resolve('Antennae')

ps1_image_color(
  coords_antennae$ra, 
  coords_antennae$dec, 
  format = 'png', 
  size = 600
) |> 
  magick::image_read() |> 
  magick::image_resize("400x400")