thebioengineer / camcorder

Record plots generated during an R session and replay as a gif!
https://thebioengineer.github.io/camcorder/
Other
201 stars 7 forks source link

`bg` argument to set non-transparent backgrounds #30

Closed z3tt closed 2 years ago

z3tt commented 2 years ago

While re-rendering the vignette gif I noticed that pngs are saved with a trasnparent background, as now common with the ragg devices. It would be great to have a bg option as in those or (maybe keeping it more simple but not sure if easy to implement) to set the backround white in case it is transparent and leave it as it is otherwise.

z3tt commented 2 years ago

So the issue was present for a moment, but now there are no transparent backgronds anymore. Not sure what is going on, i was always working with the example code in the readme and did not touch the camcorder functions.

thebioengineer commented 2 years ago

Hmmm, that's so weird. We could add that option to gg_record if it isn't there, I think we do set background for the saving of the gif

z3tt commented 2 years ago

I just saw there is a background argument in gg_playback(). However, backgrounds are always black for me anyway. IMO would be better to set it for the saved plots themselves. First, one may want to use the static plots as well. Secondly, one could still have a background of different color in case image sizes switch within an animation.

z3tt commented 2 years ago

Btw, I was able to create a gif without a plot or panel background again (different Win machine, same camcorder version). diamonds

thebioengineer commented 2 years ago

corrected in #36