Comments (7)
JPG loading is handled through PIL, and the pil_to_array code explicitly flips the image upside down. This seems like a bug, but I'm hesitant to fix it since it's been that way for at least 3 years in a commit by @jdh2358 -- I'm surprised we're just finding it now -- and this isn't an area I'm terribly familiar with.
diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index f2d9984..93402d4 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -1257,7 +1257,7 @@ def pil_to_array( pilImage ): """ def toarray(im): 'return a 1D array of floats' - x_str = im.tostring('raw',im.mode,0,-1) + x_str = im.tostring() x = np.fromstring(x_str,np.uint8) return x
from matplotlib.
I think the thread below is related with this issue. I don't think we actually made any action though.
http://old.nabble.com/Question-about-imshow-ts23578564.html
from matplotlib.
Changing assignment to Andrew, since I don't quite understand the history and backward incompatibility issues.
from matplotlib.
I can verify that this is a bug. Here's the much simplified version we use in scikits.image:
from matplotlib.
I believe this is fixed by #616.
from matplotlib.
I can confirm that this was fixed 5 days ago.
from matplotlib.
Just a note: as this is a pretty significant backward-incompatible change, it is only on master, and won't be in the 1.1.2rc.
from matplotlib.
Related Issues (20)
- [MNT]: Inconsistent use of "inherit" and "auto" for color fallback in rcParams HOT 3
- [ENH]: axes.labelcolor should use text.color by default HOT 3
- [ENH]: Automatically trim the time on the x axis HOT 20
- [Bug]: Pyplot internal bug HOT 1
- [Bug]: PolygonSelector should hide itself when zoom/pan is active HOT 6
- [Bug]: Removing tools from the toolmanager that are not on the toolbar triggers an exception
- [TST] Upcoming dependency test failures
- [Doc]: `get_figure` may return a `SubFigure` HOT 7
- [ENH]: Make the font family "Computer Modern" more accessible HOT 1
- [Bug]: Log scaled barplots in PDF result in infinite rectangles HOT 3
- [Bug]: `Path.cleaned()` always returns a closed path HOT 8
- [ENH]: Drop STOP codes? HOT 1
- [Bug]: mathtext should distinguish between unary and binary minus HOT 4
- [MNT]: Essential build requirements not included in dev-requirements
- [Doc]: ConnectionError when using intersphinx: https://matplotlib.org/stable/objects.inv HOT 2
- [MNT]: Colormaps odd behavior (1 != 1.0) HOT 13
- [MNT]: Misleading function name `Poly3DCollection.get_vector()` HOT 1
- [Bug]: Interactive Mode Image Visualization HOT 1
- [Bug]: Qt test_ipython fails on older ipython HOT 2
- [TST] Upcoming dependency test failures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matplotlib.