{"id":13789152,"url":"https://github.com/ropensci/magick","last_synced_at":"2025-10-21T20:57:38.816Z","repository":{"id":38359797,"uuid":"62457516","full_name":"ropensci/magick","owner":"ropensci","description":"Magic, madness, heaven, sin","archived":false,"fork":false,"pushed_at":"2025-03-21T11:31:16.000Z","size":16490,"stargazers_count":469,"open_issues_count":89,"forks_count":67,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-21T12:24:46.234Z","etag":null,"topics":["image-manipulation","image-processing","imagemagick","r","r-package","rstats"],"latest_commit_sha":null,"homepage":"https://docs.ropensci.org/magick","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ropensci.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-02T15:33:30.000Z","updated_at":"2025-03-21T11:31:20.000Z","dependencies_parsed_at":"2023-09-25T22:11:18.721Z","dependency_job_id":"1b8e9f53-9ca5-4489-a212-6df6518592f3","html_url":"https://github.com/ropensci/magick","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmagick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmagick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmagick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fmagick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","download_url":"https://codeload.github.com/ropensci/magick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253668017,"owners_count":21944962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-manipulation","image-processing","imagemagick","r","r-package","rstats"],"created_at":"2024-08-03T21:00:59.126Z","updated_at":"2025-10-21T20:57:38.788Z","avatar_url":"https://github.com/ropensci.png","language":"R","funding_links":[],"categories":["R","Drawing \u0026 Rendering"],"sub_categories":["Miscellaneous"],"readme":"# rOpenSci: The *magick* package\n\n\u003e Advanced Image-Processing in R\n\n\u003c!-- badges: start --\u003e\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/magick)](https://cran.r-project.org/package=magick)\n[![magick status badge](https://ropensci.r-universe.dev/badges/magick)](https://ropensci.r-universe.dev/magick)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/magick)](https://cran.r-project.org/package=magick)\n[![R-CMD-check](https://github.com/ropensci/magick/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/magick/actions)\n\u003c!-- badges: end --\u003e\n\nBindings to ImageMagick: the most comprehensive open-source image\nprocessing library available. Supports many common formats (png, jpeg, tiff,\npdf, etc) and manipulations (rotate, scale, crop, trim, flip, blur, etc).\nAll operations are vectorized via the Magick++ STL meaning they operate either\non a single frame or a series of frames for working with layers, collages,\nor animation. In RStudio images are automatically previewed when printed to\nthe console, resulting in an interactive editing environment.\n\n## Documentation\n\nAbout the R package:\n\n  - [Getting started: The magick package: Advanced Image-Processing in R](https://docs.ropensci.org/magick/articles/intro.html)\n  - [rOpenSci Community Call (recording)](https://vimeo.com/channels/rocommunitycalls/180799058)\n\nAbout the underlying library:\n\n - [Magick++ Tutorial](https://imagemagick.org/Magick++/tutorial/Magick++_tutorial.pdf)\n - [Magick++ STL Documentation](https://imagemagick.org/Magick++/STL.html)\n\n## Hello World\n\n**Run examples in RStudio** to see live previews of the images! If you do not use RStudio, use `image_browse` to open images. On Linux you can also use `image_display` to get an X11 preview.\n\n```r\nlibrary(magick)\nfrink \u003c- image_read(\"https://jeroen.github.io/images/frink.png\")\nimage_trim(frink)\nimage_scale(frink, \"200x200\")\nimage_flip(frink)\nimage_rotate(frink, 45) ## \u003c-- result of this is shown\nimage_negate(frink)\nfrink |\u003e \n  image_background(\"green\") |\u003e \n  image_flatten() |\u003e\n  image_border(\"red\", \"10x10\")\n```\n\n```r\nimage_rotate(frink, 45) |\u003e image_write(\"man/figures/frink-rotated.png\")\n```\n\n![](man/figures/frink-rotated.png)\n\nEffects\n\n```r\nimage_oilpaint(frink)\nimage_implode(frink)\nimage_charcoal(frink) ## \u003c-- result of this is shown\nimage_blur(frink)\nimage_edge(frink)\n```\n\n```r\nimage_charcoal(frink) |\u003e image_write(\"man/figures/frink-charcoal.png\")\n```\n\n![](man/figures/frink-charcoal.png)\n\nCreate GIF animation:\n\n```r\n# Download images\noldlogo \u003c- image_read(\"https://developer.r-project.org/Logo/Rlogo-2.png\")\nnewlogo \u003c- image_read(\"https://jeroen.github.io/images/Rlogo-old.png\")\nlogos \u003c- c(oldlogo, newlogo)\nlogos \u003c- image_scale(logos, \"400x400\")\n\n# Create GIF\n(animation1 \u003c- image_animate(logos))\nimage_write(animation1, \"man/figures/anim1.gif\")\n\n# Morph effect  \u003c-- result of this is shown\n(animation2 \u003c- image_animate(image_morph(logos, frames = 10)))\nimage_write(animation2, \"man/figures/anim2.gif\")\n```\n\n![](man/figures/anim2.gif)\n\nRead GIF animation frames. See the [rotating earth example GIF](https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif).\n\n```r\nearth \u003c- image_read(\"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif\")\nlength(earth)\nearth[1]\nearth[1:3]\nearth1 \u003c- rev(image_flip(earth)) ## How Australians see earth\nimage_write(earth1, \"man/figures/earth1.gif\") ## \u003c-- result of this is shown\n```\n\n![](man/figures/earth1.gif)\n\nR logo with dancing banana\n\n```r\nlogo \u003c- image_read(\"https://www.r-project.org/logo/Rlogo.png\")\nbanana \u003c- image_read(\"https://jeroen.github.io/images/banana.gif\")\nfront \u003c- image_scale(banana, \"300\")\nbackground \u003c- image_scale(logo, \"400\")\nframes \u003c- lapply(as.list(front), function(x) image_flatten(c(background, x)))\nimage_write(image_animate(image_join(frames)), \"man/figures/Rlogo-banana.gif\")\n```\n\n![](man/figures/Rlogo-banana.gif)\n\n## Use magick in Shiny Apps\n\nThis demo application shows how to use magick with shiny: https://github.com/jeroen/shinymagick\n\n## Installation\n\nBinary packages for __macOS__ or __Windows__ can be installed directly from CRAN:\n\n```r\ninstall.packages(\"magick\")\n```\n\nInstallation from source on Linux or OSX requires the imagemagick [`Magick++`](https://imagemagick.org/Magick++/Documentation.html) library. On __Debian or Ubuntu__ install [libmagick++-dev](https://packages.debian.org/testing/libmagick++-dev):\n\n```\nsudo apt-get install -y libmagick++-dev\n```\n\nOn __Fedora__,  __CentOS or RHEL__ we need [ImageMagick-c++-devel](https://src.fedoraproject.org/rpms/ImageMagick). However on CentOS the system version of ImageMagick is quite old. More recent versions are available from the [ImageMagick downloads](https://imagemagick.org/download/linux/CentOS/x86_64/) website.\n\n```\nsudo yum install ImageMagick-c++-devel\n````\n\nOn __macOS__ use [imagemagick@6](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/i/imagemagick@6.rb) from Homebrew.\n\n```\nbrew install imagemagick@6\n```\n\nThe unversioned homebrew formula`imagemagick` can also be used, however it has some unsolved OpenMP problems. \n\nThere is also a fork of imagemagick called graphicsmagick, but this doesn't work for this package.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fmagick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fropensci%2Fmagick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fmagick/lists"}