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
After investigating when installing from conda more dependencies are installed, in particular some libraries related to images.
This is the result of conda env export > env_1.yml
Could you confirm this is the origin of the discrepancy? I don't have this difference on Ubuntu 20.04 despite a similar behaviour of conda and pip.
I guess this is not really a bug but I wanted to raise the issue in case others encounters the situation. A solution to avoid differences is to make sure the exact same environment is used. Also other formats (png, tif, bitmap) seem to be more robust to the change of environments, I only encountered the problem with jpg so far.
Image and full print output: res1.txt res2.txt
The text was updated successfully, but these errors were encountered:
JPG is a lossy format and can be decoded differently by different implementations. The two Pillow versions (PyPI and Conda) likely use a different version of jpeglib. Since you are using Windows, the pip version likely uses the latest jpeglib-turbo, while from your post it looks like Conda is using jpeglib version 9d.
Thanks for the reply. Indeed following the issue you linked I printed print(Image.core.jpeglib_version) and get 8.0 for the pip install and 9.0 for the conda install.
What did you do?
I imported the same jpg image in two different environment but with the same pillow and python version.
What did you expect to happen?
The imported image to have the same value.
What actually happened?
The pixel values differs.
What are your OS, Python and Pillow versions?
To reproduce the result, assuming one has conda installed:
Then run:
You will get
(Full result in res1.txt)
But doing
Then running the same script you will get:
(Full result in res2.txt)
The pixel values are different.
After investigating when installing from conda more dependencies are installed, in particular some libraries related to images.
This is the result of conda env export > env_1.yml
And this is the one for env_2, with pillow installed via pip:
Could you confirm this is the origin of the discrepancy? I don't have this difference on Ubuntu 20.04 despite a similar behaviour of conda and pip.
I guess this is not really a bug but I wanted to raise the issue in case others encounters the situation. A solution to avoid differences is to make sure the exact same environment is used. Also other formats (png, tif, bitmap) seem to be more robust to the change of environments, I only encountered the problem with jpg so far.
Image and full print output:
res1.txt
res2.txt
The text was updated successfully, but these errors were encountered: