title: Gif/Mp4 quality using R animation/gganimate package different across Linux/Windows operating systems
body: <p>Using the same code script, R/Imagemagick produces outputs of different image quality depending on the operating system that runs the script. Notably, the geoms and text in the windows version are noticeably more pixelated.</p>
  
  <p>Here are links to the <a href="https://github.com/mikeleeco/animation_samples/blob/master/stackoverflow/linux%20dancing%20ball.gif" rel="nofollow noreferrer">Linux (ubuntu 16.04)</a> and <a href="https://github.com/mikeleeco/animation_samples/blob/master/stackoverflow/windows%20dancing%20ball.gif" rel="nofollow noreferrer">Windows (I believe 7 Professional)</a> gifs created via the following code script, via the README of Thomas Pederson's <a href="https://github.com/thomasp85/tweenr" rel="nofollow noreferrer">tweenr package</a>:</p>
  
  <pre><code>library(ggplot2)
  library(gganimate)
  library(ggforce)
  library(tweenr)
  
  # this line is included to link to imagemagick in Windows, not needed in Linux
  ani.options(convert = 'C:/Program Files/ImageMagick-7.0.4-Q16/magick.exe')
  
  # Making up data
  t &lt;- data.frame(x=0, y=0, colour = 'forestgreen', size=1, alpha = 1, 
                  stringsAsFactors = FALSE)
  t &lt;- t[rep(1, 12),]
  t$alpha[2:12] &lt;- 0
  t2 &lt;- t
  t2$y &lt;- 1
  t2$colour &lt;- 'firebrick'
  t3 &lt;- t2
  t3$x &lt;- 1
  t3$colour &lt;- 'steelblue'
  t4 &lt;- t3
  t4$y &lt;- 0
  t4$colour &lt;- 'goldenrod'
  t5 &lt;- t4
  c &lt;- ggforce::radial_trans(c(1,1), c(1, 12))$transform(rep(1, 12), 1:12)
  t5$x &lt;- (c$x + 1) / 2
  t5$y &lt;- (c$y + 1) / 2
  t5$alpha &lt;- 1
  t5$size &lt;- 0.5
  t6 &lt;- t5
  t6 &lt;- rbind(t5[12,], t5[1:11, ])
  t6$colour &lt;- 'firebrick'
  t7 &lt;- rbind(t6[12,], t6[1:11, ])
  t7$colour &lt;- 'steelblue'
  t8 &lt;- t7
  t8$x &lt;- 0.5
  t8$y &lt;- 0.5
  t8$size &lt;- 2
  t9 &lt;- t
  ts &lt;- list(t, t2, t3, t4, t5, t6, t7, t8, t9)
  
  tweenlogo &lt;- data.frame(x=0.5, y=0.5, label = 'tweenr', stringsAsFactors = F)
  tweenlogo &lt;- tweenlogo[rep(1, 60),]
  tweenlogo$.frame &lt;- 316:375
  
  # Using tweenr
  tf &lt;- tween_states(ts, tweenlength = 2, statelength = 1, 
                     ease = c('cubic-in-out', 'elastic-out', 'bounce-out', 
                              'cubic-out', 'sine-in-out', 'sine-in-out', 
                              'circular-in', 'back-out'), 
                     nframes = 375)
  
  # Animate with gganimate
  p &lt;- ggplot(data=tf, aes(x=x, y=y)) + 
    geom_text(aes(label = label, frame = .frame), data=tweenlogo, size = 13) + 
    geom_point(aes(frame = .frame, size=size, alpha = alpha, colour = colour)) + 
    scale_colour_identity() + 
    scale_alpha(range = c(0, 1), guide = 'none') +
    scale_size(range = c(4, 60), guide = 'none') + 
    expand_limits(x=c(-0.36, 1.36), y=c(-0.36, 1.36)) + 
    theme_bw()
  animation::ani.options(interval = 1/15)
  gganimate(p, "dancing ball.gif", title_frame = F, ani.width = 800, 
             ani.height = 800)
  </code></pre>
  
  <p>Finally, here are the animation options in running on Ubuntu:</p>
  
  <pre><code>&gt; animation::ani.options()
  $interval
  [1] 0.06666667
  
  $nmax
  [1] 50
  
  $ani.width
  [1] 480
  
  $ani.height
  [1] 480
  
  $imgdir
  [1] "images"
  
  $ani.type
  [1] "png"
  
  $ani.dev
  [1] "png"
  
  $title
  [1] "Animations Using the R Language"
  
  $description
  [1] "Animations generated in R version 3.4.0 (2017-04-21) using the package animation"
  
  $verbose
  [1] TRUE
  
  $loop
  [1] TRUE
  
  $autobrowse
  [1] TRUE
  
  $autoplay
  [1] TRUE
  
  $use.dev
  [1] TRUE
  
  $ffmpeg
  [1] "ffmpeg"
  </code></pre>
  
  <p>Since there are quite a bit of dependencies that go into creating the visualization, I'm a bit stumped on where to address changes. What revisions need to be made to improve the quality of the Windows version? I've heard that convert in Imagemagick is deprecated, perhaps something relating to that connection?</p>