You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran the code below and then open the image in Fiji (ImageJ)
What did you expect to happen?
Create an image with a gradient that goes from 0 to 1 diagonally
What actually happened?
Created the image correctly but the last row of pixels is 0 (black). I don't know if this is a problem of Pillow in saving to spi or of imagej in opening spi.
What versions of Pillow and Python are you using?
4.1.1
from __future__ importdivisionfromPILimportImageimportnumpyasnpdefgradient(i,j,S):
return1/2*(i+j)/(S-1)
# Create ImageS=512Mpix=np.fromfunction(gradient,(S,S),dtype=np.float32,S=S)
Img=Image.fromarray(Mpix,mode="F")
# Save ImageImg.save("TestPIL_32.spi","spider")
The text was updated successfully, but these errors were encountered:
I've taken a look at this, and I can confirm that it does show up in the Fiji interface with a black line. It's part of the image data, since it also shows up in the histogram.
I've also looked at the spider image in a hexeditor, and it's not there. So either Fiji is wrong, or there's an off by one somewhere in the image size such that it's reading one beyond the end of the image and filling that with 0s instead of actual data.
What did you do?
I ran the code below and then open the image in Fiji (ImageJ)
What did you expect to happen?
Create an image with a gradient that goes from 0 to 1 diagonally
What actually happened?
Created the image correctly but the last row of pixels is 0 (black). I don't know if this is a problem of Pillow in saving to spi or of imagej in opening spi.
What versions of Pillow and Python are you using?
4.1.1
The text was updated successfully, but these errors were encountered: