This does not cut it, I am trying to use pytqgraph for this task, as I am building this functionality as part of an GUI built in PyQt. My plan after this is to edit some of the events to customize the behavior of the images.
Thanks for the answer. El lunes, 22 de agosto de 2022 a las 16:12:23 UTC+2, [email protected] escribió: > Le 22/08/2022 à 15:47, Oier Arcelus a écrit : > > I have an image to be shown using pyqtgraph. For this I use a numpy 2D > array, which has a many elements along axis 1, but less along axis 0. As a > result, I obtain ImageView's with very high aspect ratio, and I would like > to stretch it such that it fits to the original view of the window that its > shown in the screen. > > I cannot find any entries about this in the forum and any help about this > would be greatly appreaciated. > > Use (e.g.) PIL (Pillow...) and numpy, say: > > > > > > > > > *from PIL import Image import numpy as np img = > Image.open('yourimage.png') nimg = img.resize((200, 100)) # for example > nimg.show() # or not. tbl=np.array(nimg)* > > This is all. Unless I misunderstood your problem. Do you need some > specific interpolation policy? You don't even say what is the colour depth > of your image, so I chose anything... > > Jerzy Karczmarczuk > > > > [image: width=] > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Sans > virus.www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > > <#m_-7460269599118137348_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > -- 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/7f5e8eba-1f84-4bda-baaa-4a42b66c3128n%40googlegroups.com.
