Reputation: 1490
I wanted to read in JPG with Pillow
and then show it with imshow
from matplotlib
, but the image doesn't look like the original file. What's wrong?
img = Image.open("my_pics/cat.jpg")
arr = np.array(img)
plt.imshow(arr)
Upvotes: 6
Views: 2625
Reputation: 191
You can go to Preferences -> Languages & Frameworks -> Jupyter
and uncheck invert image outputs for dark themes
. You will need to reopen the editor to apply the change.
Upvotes: 19
Reputation: 1490
The Dark-Mode in Pycharm alters the image (as of Feb. 22nd '22).
Maybe JetBrains will patch this in future updates.
Upvotes: 5