Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'ani.res' option is ignored if 'ani.dev' is 'agg_png' #134

Closed
trevorld opened this issue Jul 20, 2021 · 0 comments · Fixed by #135
Closed

'ani.res' option is ignored if 'ani.dev' is 'agg_png' #134

trevorld opened this issue Jul 20, 2021 · 0 comments · Fixed by #135

Comments

@trevorld
Copy link
Contributor

I'll be making a Pull Request that fixes this.

library("animation")
library("grid")
library("ragg")

grob <- rectGrob(x = unit(1.5, "in"), width = unit(1.0, "in"), 
                 gp = gpar(fill = "blue", col = NA))

# right half should be blue but isn't
saveGIF(grid.draw(grob), ani.height = 200, ani.width = 200, ani.res = 100,
        ani.dev = 'agg_png')

agg_png("example.png", width = 200, height = 200, res = 100)
grid.draw(grob)
dev.off()
yulijia pushed a commit that referenced this issue Jul 21, 2021
* Add support for 'ani.res' for arbitrary graphic devices
  in 'saveGIF()', 'saveHTML()', and 'saveVideo()'.
* Should work for any graphic device function with 'res'
  as an argument.  In particular should continue to support R's built-in
  raster image format devices as well as 'ragg::agg_png()'
  and R's built-in devices passed in as a function instead of string.
* Still no 'ani.res' support in 'saveLatex()' ('pdf' devices recommended)
  nor 'saveSWF()' (flash no longer supported in many browsers)
* Also fixes bug when 'ani.dev' is a function instead of a character vector

closes #133, closes #134


Checked, works fine on CentOS8.

Thank you Trevor!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant