2

I am trying to create a multipanel animation in r and am using the magick package and gganimate to put a few GIFs together. When I try to read in the GIFs I get this error

Is there anything I can do to get around this?

library(magick)
library(gganimate)
ateles_mgif <- image_read("Ateles_geoffroyi_Inez.gif")

Error in magick_image_readpath(path, density, depth, strip) : 
  Magick: MemoryAllocationFailed `C:\Users\sealavi\Documents\Nasua_narica_Avery.gif' @ error/gif.c/ReadGIFImage/1307*

I need to be able to run image_read() on 4 .gif files, each in the 200-400MB range, but I'm doing this on a machine with 530gb of ram so should have plenty of memory.

r2evans
  • 141,215
  • 6
  • 77
  • 149
sea83
  • 81
  • 5
  • Does `gganimate` have anything to do with your failure? All you've done is load the library, none of its code has executed yet. I wonder if your memory allocation error is a matter for ImageMagick (and perhaps tangentionally then with the `magick` package, though if IM fails then `magick` cannot magically make it work). – r2evans Dec 04 '19 at 00:32
  • That's what I'm not sure of, if the problem is because ImageMagick has some memory allocation rules then I have no idea how to address that. I sincerely doubt gganimate is the problem because as you say I haven't done anything aside from loading the library. – sea83 Dec 04 '19 at 07:28

0 Answers0