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

Add a `gg_stop_recording` #10

Closed TylerGrantSmith closed 3 years ago

TylerGrantSmith commented 4 years ago

Shouldn't there be a method to turn off the recording feature? I guess I had assumed calling gg_playback() would have done it, but that does not appear to be the case.

thebioengineer commented 4 years ago

gg_playback() does turn off the recording feature. However, a gg_stop_recording() does make sense!

thebioengineer commented 4 years ago

could you share a screenshot of what was going on?

TylerGrantSmith commented 4 years ago

No apparently I cannot. ImageMagick was erroring when trying to write a file. I can't seem to replicate it anymore and the procedure seems to work now, and yes gg_playback() does stop it.

TylerGrantSmith commented 4 years ago

I think maybe one of the png that had been produced was corrupted?

gg_playback()
Error in magick_image_readpath(enc2native(path), density, depth, strip,  : 
  rsession.exe: ImproperImageHeader `C:\Users\e014307\AppData\Local\Temp\1\RtmpAL3qnt\6b78fbf3938148a28a7e4edb53fb24db.png' @ error/png.c/ReadPNGImage/4050
thebioengineer commented 4 years ago

that's what it looks like. Which is strange, and I'm not sure how we would be able to fix that. But that would probably be why it didnt stop the recording - the function error-ed out before it hit the part where it turned off recording.

thebioengineer commented 3 years ago

addressed in #9