Octoframes / jupyter_capture_output

A cellmagic that captures celloutput such as text, image or video to files.
https://octoframes.github.io/jupyter_capture_output/
MIT License
31 stars 0 forks source link

File says Created but nothing there just RichOutput message #16

Open gabrielalon-blai opened 6 months ago

gabrielalon-blai commented 6 months ago

%%capture_img --path "food.png" --compression 50 test.show() Prints out: Output saved by creating file at food.png. <IPython.utils.capture.RichOutput at 0x15fbba6d0>

Then there is no food.png file even though there is a foo.png next to it from running the basic example. Granted, the test object i am using is unique to my company, but i was hoping that this library could generally capture any image that is outputted in jupyter notebooks cells. Thanks!

kolibril13 commented 6 months ago

thanks for the report! the image format has to be .png: https://github.com/Octoframes/jupyter_capture_output/blob/main/jupyter_capture_output/co_cellmagic.py#L128C1-L129C1

gabrielalon-blai commented 6 months ago

any thoughts on converting IPython.utils.capture.RichOutput into a png?