An ImageItem will do what you want. Here's an example: import pyqtgraph as pg import numpy as np
app = pg.mkQApp() # load your image into a numpy array here... img_data = np.random.randn(10, 10) img = pg.ImageItem(img_data) vb = pg.ViewBox(lockAspect=True, enableMouse=False, enableMenu=False) vb.addItem(img) gv = pg.GraphicsView() gv.setCentralWidget(vb) gv.show() app.exec_() High-level documentation on how to use all of these graphics items and such is a bit sparse, but there are examples demonstrating usage of most of them (here: https://github.com/pyqtgraph/pyqtgraph/tree/develop/examples). It might also help to read through some of Qt's graphics view framework documentation to get familiar with the terminology used: https://doc.qt.io/qt-5/graphicsview.html On Wednesday, May 15, 2019 at 2:20:45 AM UTC-7, Francisco Gonzalez-Longatt wrote: > > Dear Group > I am not a top expert in python or even pyqtgraph. However, I am > developing a small project where I need to present a .jpeg. Could you > please how to do so... > I am using this, > > import sys > import pyqtgraph as pg > import numpy as np > from PIL import Image > import numpy as np > > > > ImgFilename = 'Mapa de Norway.jpg' > def run(): > if not QApplication.instance(): > app = QApplication(sys.argv) > else: > app = QApplication.instance() > app.exec_() > i = Image.open(ImgFilename) > i = i.transpose(Image.FLIP_TOP_BOTTOM) > i = i.rotate(-45) > imgg = np.asarray(i) > #pg.image(imgg) # FUNCIONA > > > imv = pg.ImageView() > imv.show() > imv.setImage(imgg) > > However, I do not need Histogram, ROI, Menu, etc...It is just presenting > the jpeg. > Looking forward to your advice, responses are much appreciated! > FGL > > > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/87a04570-fa2e-48b4-8f2a-e64e6ef4c837%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
