Giter VIP home page Giter VIP logo

magick's Introduction

rOpenSci: The magick package

Advanced Image-Processing in R

Project Status: Active – The project has reached a stable, usable state and is being actively developed. CRAN_Status_Badge magick status badge CRAN RStudio mirror downloads R-CMD-check

Bindings to ImageMagick: the most comprehensive open-source image processing library available. Supports many common formats (png, jpeg, tiff, pdf, etc) and manipulations (rotate, scale, crop, trim, flip, blur, etc). All operations are vectorized via the Magick++ STL meaning they operate either on a single frame or a series of frames for working with layers, collages, or animation. In RStudio images are automatically previewed when printed to the console, resulting in an interactive editing environment.

Documentation

About the R package:

About the underlying library:

Hello World

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.

library(magick)
frink <- image_read("https://jeroen.github.io/images/frink.png")
image_trim(frink)
image_scale(frink, "200x200")
image_flip(frink)
image_rotate(frink, 45) ## <-- result of this is shown
image_negate(frink)
frink |> 
  image_background("green") |> 
  image_flatten() |>
  image_border("red", "10x10")
image_rotate(frink, 45) |> image_write("man/figures/frink-rotated.png")

Effects

image_oilpaint(frink)
image_implode(frink)
image_charcoal(frink) ## <-- result of this is shown
image_blur(frink)
image_edge(frink)
image_charcoal(frink) |> image_write("man/figures/frink-charcoal.png")

Create GIF animation:

# Download images
oldlogo <- image_read("https://developer.r-project.org/Logo/Rlogo-2.png")
newlogo <- image_read("https://jeroen.github.io/images/Rlogo-old.png")
logos <- c(oldlogo, newlogo)
logos <- image_scale(logos, "400x400")

# Create GIF
(animation1 <- image_animate(logos))
image_write(animation1, "man/figures/anim1.gif")

# Morph effect  <-- result of this is shown
(animation2 <- image_animate(image_morph(logos, frames = 10)))
image_write(animation2, "man/figures/anim2.gif")

Read GIF animation frames. See the rotating earth example GIF.

earth <- image_read("https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif")
length(earth)
earth[1]
earth[1:3]
earth1 <- rev(image_flip(earth)) ## How Austrialans see earth
image_write(earth1, "man/figures/earth1.gif") ## <-- result of this is shown

R logo with dancing banana

logo <- image_read("https://www.r-project.org/logo/Rlogo.png")
banana <- image_read("https://jeroen.github.io/images/banana.gif")
front <- image_scale(banana, "300")
background <- image_scale(logo, "400")
frames <- lapply(as.list(front), function(x) image_flatten(c(background, x)))
image_write(image_animate(image_join(frames)), "man/figures/Rlogo-banana.gif")

Use magick in Shiny Apps

This demo application shows how to use magick with shiny: https://github.com/jeroen/shinymagick

Installation

Binary packages for macOS or Windows can be installed directly from CRAN:

install.packages("magick")

Installation from source on Linux or OSX requires the imagemagick Magick++ library. On Debian or Ubuntu install libmagick++-dev:

sudo apt-get install -y libmagick++-dev

On Fedora, CentOS or RHEL we need ImageMagick-c++-devel. However on CentOS the system version of ImageMagick is quite old. More recent versions are available from the ImageMagick downloads website.

sudo yum install ImageMagick-c++-devel

On macOS use imagemagick@6 from Homebrew.

brew install imagemagick@6

The unversioned homebrew formulaimagemagick can also be used, however it has some unsolved OpenMP problems.

There is also a fork of imagemagick called graphicsmagick, but this doesn't work for this package.

magick's People

Contributors

bfgray3 avatar bisaloo avatar davidquartey avatar dmi3kno avatar gaborcsardi avatar gvelasq avatar jeroen avatar jimhester avatar jonocarroll avatar jsta avatar jwijffels avatar katrinleinweber avatar kbroman avatar maelle avatar maxheld83 avatar mikemahoney218 avatar noamross avatar pmur002 avatar retowyss avatar romainfrancois avatar thomasp85 avatar wch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magick's Issues

more informative error on unsupported input format?

perhaps instead of stopifnot(inherits(x, "magick-image")) which gives Error: inherits(image, "magick-image") is not TRUE which I imagine some new to R may not understand

if (!inherits(x, "magick-image")) {
  stop('expecting object of class magick-image, class ', class(x), ' not supported')
}

Create GIF

I was wondering how I would go about creating a GIF from multiple r plots with magick.

What i normally do is:

png(file="temp/example%02d.png")

for (i in subsets) {

    plot(subset(data, some.subset == i))

}

dev.off()

and then use the png in temp to create a GIF. I think magick can make this process easier but I do not really see how to go about.

make it easier to specify geometry

Related to my apparently very confusing question on the community call.

Various operations require user to specify a location or region in the Magick geometry specification, which is by default in pixels. This leads to lots of annoying arithmetic and trial and error for the user.

I was asking for ways to make this easier, such as:

  1. specify a location relative to the image, e.g, seed the fill at c(0.5, 0.5) = middle of the image
  2. overlay a grid or some sentinel points with pixel location indicated (like a football field)

As for point 1, it looks like the % geometry qualifier is very handy, so maybe worth featuring in docs or examples. Not sure if there's still room for magick to alleviate annoying arithmetic problems.

Feature request: -gravity and -extent

I'm trying to batch process images to pad their canvas sizes so they fit a 3 x 2 ratio. This works in the command line with ImageMagick

convert mypic.jpg -background white -gravity center  -extent 1611x1074  mypic_3x2.jpg

As far as I can tell, magick implements the -background functionality with image_background(), but not gravity or extent. If at some point those could be added, that would be great. (Meanwhile, off to figure out how to run that command as a shell script from R....)

Thanks for the great package.

as.raster broken

Dimensions don't seem to match bitmap size:

tiger <- image_read('https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg')
as.raster(tiger)

Line joins don't work

Setting line join doesn't work in combination with setting a linecap. This looks like a bug in IM.

# line joins
img <- image_graph()
par(ljoin=0)
y=c(0,1,0,5,0)
plot(y,lwd=20,type="l",ylim=c(0,10))
par(ljoin=1)
lines(y+2,lwd=20,type="l")
par(ljoin=2)
lines(y+4,lwd=20,type="l")
dev.off()

# mitre (doesn't work)
img <- image_graph()
par(ljoin=1) # lmitre only active for ljoin=1
y=c(0,30,0)
x=c(-1:1)
plot(x, y,lwd=10,type="l",ylim=c(0,40),xlim=c(-20,20))
par(ljoin=1, lmitre=30) # default lmitre=10
lines(x+4,y,lwd=10,type="l",ylim=c(0,40))
dev.off()

remove print(image_info(x)) from magick:::`print.magick-image`

is there a way to suppress the print call at the end of the function?

if not can it be removed or add for a flag to control its print?

it is causing issues when we want to use the print function and are getting output in the console

magick:::`print.magick-image`
function (x, ...) 
{
   viewer <- getOption("viewer")
   ext <- ifelse(length(x), tolower(image_info(x[1])$format), 
       "gif")
   if (is.function(viewer)) {
       tmp <- file.path(tempdir(), paste0("preview.", ext))
       image_write(x, path = tmp)
       viewer(tmp)
   }
   print(image_info(x))
   invisible()
}

`density` option when reading PDFs with `image_read`

PDFs appear to be down sampled quite badly when you read them in currently. Is there a way to add a density argument to specify the resolution of a PDF when using image_read()? Something analogous to command line statements like convert -density 300 file.pdf file.png

example (challenge?): convert all pixels of color A to color B

I just captured some hand-drawings with a black "pen" then realized I needed to use them on a dark background. So I wanted to switch every pixel that is, say, "#FFFFFF" to "#000000".

I used the command line. This, cribbed from here, worked on the first try 😮:

mogrify -path ./ -format pdf -fill "#FFFFFF" -opaque "#000000" *.pdf

I didn't try it with magick yet, but it would be interesting to see if this is easy. If not, could it be? If it is, it might make a useful example.

Representative input file.
Arrows-jenny-2016-11-06.pdf

image_montage

I'm trying to use image_montage perhaps I don't know how, but I get:

> image_read(files) %>% image_montage()
Fontconfig warning: line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
Fontconfig warning: line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
Error in eval(substitute(expr), envir, enclos) : 
  Magick: NoDecodeDelegateForThisImageFormat `' @ error/blob.c/ImagesToBlob/1813
> 
> traceback()
6: stop(list(message = "Magick: NoDecodeDelegateForThisImageFormat `' @ error/blob.c/ImagesToBlob/1813", 
       call = eval(substitute(expr), envir, enclos), cppstack = NULL))
5: .Call("magick_magick_image_write", PACKAGE = "magick", input, 
       format, quality)
4: magick_image_write(image, format, quality)
3: image_write(x, path = tmp)
2: `print.magick-image`(x)
1: function (x, ...) 
   UseMethod("print")(x)

This however seems to create something that makes sense:

> montage <- image_read(files) %>% image_montage()
> str( montage )
Class 'magick-image' <externalptr> 
> montage[[1]]
4 channel 768x504 bitmap array: raw [1:4, 1:768, 1:504] ff ff ff ff ...
 - attr(*, "class")= chr [1:2] "bitmap" "reba"

but then:

> montage
Error in eval(substitute(expr), envir, enclos) : 
  Magick: NoDecodeDelegateForThisImageFormat `' @ error/blob.c/ImagesToBlob/1813

This seems to work:

image_write(montage, format = "jpeg", path = "/tmp/test.jpeg")

test

Also, it seems that the image_montage function does not offer the geometry (or any other option actually, e.g. background, etc ...) control as in the underlying api

files that I use above is the list of these images

# git clone https://github.com/tmm1/emoji-extractor.git
files <- list.files( "emoji-extractor/images/160x160/", full.names = TRUE )

geometry in image_border()

Are these images different?

library("magick")
logo <- image_read("https://www.r-project.org/logo/Rlogo.png")
image_border(logo, "red", "10x10")
image_border(logo, "red", "10x10+5-5")

If not, it seems like a bug.

Error in magick_image_write: Magick: memory allocation failed

I get an error in a 1gb ubuntu machine at AWS:

Warning: Error in magick_image_write: Magick: memory allocation failed `' @ error/gif.c/WriteGIFImage/1648

The server used to work fine with 0.4 version, but today I updated the system and R packages and image_write does not work anymore. I've tried rolling back to 0.4 and I get the same error, so I guess it is a problem with libmagick++-dev which probably has been updated too.

Any hint on how to use magick in low RAM machines?

sessionInfo()

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] memapp_2.4.20170802 magick_0.5

loaded via a namespace (and not attached):
[1] shiny_1.0.3 compiler_3.4.1 R6_2.2.2 htmltools_0.3.6
[5] Rcpp_0.12.12 digest_0.6.12 xtable_1.8-2 httpuv_1.3.5
[9] mime_0.5

Generic bitmap class

Separate package to define bitmap classes and allow for conversion between color spaces (RGB, CMYK, etc) and various R raster formats (doubles, strings, etc).

Also take care of various ordering conventions. Maybe use boost gil for conversion.

Read nativeVector format images

I'm trying to plot an image directly to magick memory rather than round-tripping to disk, and can do so like so:

library(Cairo)
library(ggplot2)
library(magick)
x = 1680
y= 1050

Cairo(type="raster", width=x, height=y)
ggplot(mtcars, aes(x=cyl, y=mpg)) + geom_point()
i <- image_read(structure(packBits(intToBits(dev.capture(native=TRUE))), dim=c(4, x, y)))
dev.off()
image_write(i, "testmem.gif")

However, this is still slower than disk round-trip, with most of the time being taken up by translating the nativeRaster (8-bit ARGB, stored as integers) produced by dev.capture() to the right raw format:

screen shot 2016-12-06 at 8 52 56 pm

It would be great if image_read() could also take nativeRasters for this use case and do the right conversion in a performant way. I think there are lots of applications where you'd like to manipulate plots without going to disk for good performance. (I'm currently trying to do this to update the gganimate package).

building a thumbnail gallery

I am enjoying this package. However, I cannot figure out how to use image_append to create a thumbnail gallery of images. I have a table with the names of each png that needs to be added for a given week. I am trying to write something that will create 4 images across and have a variable number of rows, some weeks it will be 23 (6 rows) images, other weeks 75+ (19 rows). I've been trying to create a for loop that appends left_to_right and then top_to_bottom as shown in the vignette. Using assign(x, image_read) goes through but then says it isn't a magick image when I try to call it with get(). Any help would be appreciated.

Build fails on OSX with gcc-7

Hello,

I'm trying to install magick 0.4 because it is a dependency of pkgdown. I've found that I cannot build it using gcc-7 on OSX (10.12.5), for R 3.4.0; all via homebrew. Switching to clang works though.

With gcc it compiles without issue but does not load:

** testing if installed package can be loaded
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/3.4/site-library/magick/libs/magick.so':
  dlopen(/usr/local/lib/R/3.4/site-library/magick/libs/magick.so, 6): Symbol not found: __ZN6Magick10labelImageC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
  Referenced from: /usr/local/lib/R/3.4/site-library/magick/libs/magick.so
  Expected in: flat namespace
 in /usr/local/lib/R/3.4/site-library/magick/libs/magick.so
Error: loading failed
Execution halted
ERROR: loading failed

Example gcc line:

g++-7 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/openblas/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -L/usr/local/Cellar/r/3.4.0_1/R.framework/Resources/lib -L/usr/local/opt/openblas/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o magick.so RcppExports.o attributes.o base.o config.o edit.o register.o transformations.o -L/usr/local/Cellar/imagemagick/7.0.5-9/lib -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -F/usr/local/Cellar/r/3.4.0_1/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation

Here are the pkg-config notes:

Found pkg-config cflags and libs!
Using PKG_CFLAGS=-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/Cellar/imagemagick/7.0.5-9/include/ImageMagick-7
Using PKG_LIBS=-L/usr/local/Cellar/imagemagick/7.0.5-9/lib -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI

If I switch to clang it does compile successfully.

Example clang line:

clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/openblas/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -L/usr/local/Cellar/r/3.4.0_1/R.framework/Resources/lib -L/usr/local/opt/openblas/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o magick.so RcppExports.o attributes.o base.o config.o edit.o register.o transformations.o -L/usr/local/Cellar/imagemagick/7.0.5-9/lib -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -F/usr/local/Cellar/r/3.4.0_1/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation

Thanks,
Chris

Font metrics are slow (especially first time) for static builds

Mac OSX

Using the OSX magick CRAN build, the magick graphics device has a few sec overhead on the first time of using fonts after a reboot:

fig <- image_device(res = 96)
ggplot2::qplot(mpg, wt, data = mtcars, colour = cyl)
dev.off()
print(fig)

After the first time it is gone. Even if we restart R. Perhaps fontconfig is rebuilding some tmp cache?

Windows

On Windows all font operations (both calc metrics and drawing) are consistently quite slow. Need to figure out how to debug what it is doing.

FontCondfig Debugging

The fontoconfig manual pages:

Name         Value    Meaning
  ---------------------------------------------------------
  MATCH            1    Brief information about font matching
  MATCHV           2    Extensive font matching information
  EDIT             4    Monitor match/test/edit execution
  FONTSET          8    Track loading of font information at startup
  CACHE           16    Watch cache files being written
  CACHEV          32    Extensive cache file writing information
  PARSE           64    (no longer in use)
  SCAN           128    Watch font files being scanned to build caches
  SCANV          256    Verbose font file scanning information
  MEMORY         512    Monitor fontconfig memory usage
  CONFIG        1024    Monitor which config files are loaded
  LANGSET       2048    Dump char sets used to construct lang values
  MATCH2        4096    Display font-matching transformation in patterns

So we can get some debugging info:

Sys.setenv(FC_DEBUG = 1 + 4 + 8 + 16 + 128 + 1024)
library(magick)
fig <- image_device(res = 96)
ggplot2::qplot(mpg, wt, data = mtcars, colour = cyl)
dev.off()
print(fig)

Any tips would be amazing :) @lionel- @jimhester @hadley

tutorial banana.gif not in package? (image_read("") never stops)

Hi there,
I tried to follow the ropensci tutorial about magick, and I found an error. I'm using R 3.3.2 (also tried with previous version) on windows 10, 64 bit.

in

# foreground
banana <- image_read(system.file("banana.gif", package = "magick"))

my r process doesn't stop.
I have to terminate it.

So I broke down the problem:

  • When I search for the file with only system.file("banana.gif", package = "magick") it returns ""
  • when I do a image_read("") the r process hangs (?) or at least does not terminate or error. it just keeps going.

Obtaining A Color Histogram

Hello!
This is a request for a function that returns a data representation of a color histogram on a per-image bases and or return a list/vector for a set of images.

We are doing research where we are looking for differences across sets of images.
For example, we might like to find the average histogram of image set A. Next we would find it for image set B and then see if we can find the distance between A and B.

Is this possible?

[[ broken

Similar to #15, The [[ function's code should be changed from image_write to image_write_bitmap.

rasterImage rotation

The image_raster callback currently rotates around it's centerpoint but the cairo device rotates around (x,y):

# use standard device
graphics.off()
example(rasterImage)

# using magick
img <- image_graph()
example(rasterImage)

To do the same we need to calculate the offset in the lower left corner. Something like this?

rot <- (rot + 360) %% 360;
rad <- (rot * pi) / 180
x_offset <- width * cos(rad) + height * sin(rad)
y_offset <- height * cos(rad) +  width * sin(rad)

God I'm getting old.

Support raster conversion

I think we need to implement S4 methods for:

raster  To create a RasterLayer
stack   To create a RasterStack (multiple layers)
brick   To create a RasterBrick (multiple layers)

Windows problems

A polyline from ggplot2 seems to close.

update: this happens only for a certain DrawableStrokeLineJoin which ggplot2 uses.

library(ggplot2)
img <- magick::image_device()
qplot(cars$speed, cars$dist, geom = c("smooth"), se = FALSE) + theme_void()
dev.off()
img

But this is fine:

img <- image_device(bg = 'white');
plot.new(); 
plot.window(c(0,1), c(0,1))
lines(c(0.1, 0.3, 0.2), c(0.1, 0.5, 0.8), col = "blue", lwd = 3)
dev.off()
img

Together:

library(ggplot2)
library(magick)
dev <- magick::image_device()
plot.new()
qplot(cars$speed, cars$dist, geom = c("smooth"), se = FALSE) + theme_void()
lines(c(0.1, 0.3, 0.2), c(0.1, 0.5, 0.8), col = "red", lwd = 3)
dev.off()
dev[2]

flatten does not copy

The coposite operator affects the original image, even though we set it on a copy:

library(magick)

bigdata <- image_read('http://feelgrafix.com/data_images/out/28/1004158-data.jpg')
frink <- image_read("https://jeroenooms.github.io/images/frink.png")
logo <- image_read("https://www.r-project.org/logo/Rlogo.png")
img <- image_scale(c(bigdata, logo, frink), "400x400")

image_flatten(img)
image_flatten(img, "Add")
image_flatten(img)

use htmlwidgets ?

Currently we simply call the rstudio viewer function to preview an image. Perhaps we can instead wrap it into an html widget so that the same figure will automatically be inserted into the document by knitr or shiny?

Not sure if this makes any sense at all, hopefully @timelyportfolio or @jcheng5 can chime in.

Equivalent of -alpha remove?

I'm using -background white -alpha remove to replace transparent pixels with white. I can't see how to replicate that with magick.

Feature request: local adaptive thresholding

The use case I have in mind is to clean-up images before feeding them to tesseract. I personally have seen great improvements running lat on images before feeding to tesseractbut magick has no bindings for this? I can't seem to achieve the same effect with a combination of image_contrast, image_blur, and image_enhance.

Visibility

Include R_ext/Visibility.h to control hide unexported stuff from packages.

thoughts on as_raster()?

i know it'd be easy to just png::readPNG() but any thoughts on an as_raser() capability to get this into a type other img pkgs already handle? (i can poke at this as well in a few weeks)

v0.4 fails to install on macOS

** packagemagicksuccessfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/Cellar/imagemagick/7.0.5-4/include/ImageMagick-7
Using PKG_LIBS=-L/usr/local/Cellar/imagemagick/7.0.5-4/lib -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because Magick++ was not found. Try installing:
 * deb: libmagick++-dev (Debian, Ubuntu)
 * rpm: ImageMagick-c++-devel (Fedora, CentOS, RHEL)
 * csw: imagemagick_dev (Solaris)
 * brew: imagemagick (OSX)
If Magick++ is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a Magick++.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

brew info

/usr/local/Cellar/imagemagick/7.0.5-4 (1,524 files, 23MB) *
  Built from source on 2017-03-26 at 18:14:18 with: --with-openmp --with-fontconfig --with-librsvg --with-ghostscript --with-webp --with-pango

I assume one of the options I built imagemagick with is causing problems? I will rebuild with your README suggestion and report back.

Abandoned temporary files

I just discovered that I had over 100 GB of magick temp files. I believe they were left when an rmagick function locked up and I had to force quit R. Some way of making sure these get cleaned would be a bonus.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.