Skip to content
This repository has been archived by the owner on Apr 12, 2020. It is now read-only.

ndArrayToQtImage fails for certain image sizes #5

Open
stefanv opened this issue Mar 18, 2013 · 3 comments
Open

ndArrayToQtImage fails for certain image sizes #5

stefanv opened this issue Mar 18, 2013 · 3 comments

Comments

@stefanv
Copy link

stefanv commented Mar 18, 2013

Images with certain dimensions fail to display correctly under Qt after conversion. E.g., an (187, 189) image displays as diagonal bands. Use the following snippet to produce a suitable test image:

import numpy as np
import matplotlib.pyplot as plt

image = np.zeros((187, 189))
image[:] = np.arange(189)

plt.imsave('gradient.png', image, cmap=plt.cm.gray)
@stefanv
Copy link
Author

stefanv commented Mar 18, 2013

We could also look at utilizing skimage.viewer.

@nfaggian
Copy link
Owner

Thanks Stefan - will look into this when I can find time.

@ghost
Copy link

ghost commented Feb 10, 2015

When I compile this file I get the error message:

numpy too many indices for array error

How to fix this ?
Begueradj

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants