Exporting an `Image` (v1)

Hi, I hope this is the right section for my question.

I was trying to export an image wrapped into a v1’s Image.
I assumed that saving a fastai Image to disk without passing through numpy/pillow was not possible (is it?), and I also assumed I could use (according to the docs), image2np(image:Tensor) β†’ ndarray.

However, doing something like npimage=image2np(fastaiImage) does not work.

I think that an Image should be converted to a proper image (torch tensor) first, but how?

Ideas? :thinking:

image.data will give you the underlying tensor (as said in the docs :-p )
Though we could implement an Image.save method at some point.

1 Like

Heck, I missed it. Thanks! I’m trying to learn v1 a bit faster than what’s advisable :crazy_face: