n2v icon indicating copy to clipboard operation
n2v copied to clipboard

save_tiff_imagej_compatible('pred_train.tif', pred_train, axes='YX')

Open farukalamai opened this issue 10 months ago • 3 comments

When using this it's not saving the actual predicted image. I also wanted to know how can I save the predicted image in different format like jpg/png etc.

I have tried different method, nothing is working. Its' saving a blank image.

farukalamai avatar Apr 13 '24 03:04 farukalamai

@jdeschamps

farukalamai avatar Apr 15 '24 14:04 farukalamai

Did you verify that you image is not empty?

A quick google search reveals how to save images as jpg e.g.:

from PIL import Image
im = Image.fromarray(arr)
im.save("your_file.jpeg")

tibuch avatar Apr 15 '24 14:04 tibuch

I have tried this. It's just saving a blank image.

farukalamai avatar Apr 15 '24 14:04 farukalamai