ImageView from png

147 views
Skip to first unread message

Luke M

unread,
Feb 10, 2015, 11:16:10 AM2/10/15
to pyqt...@googlegroups.com
I'm working on something that is turning out to be a bit over my head. The end goal is to display a google map image with a gps track overlay. I was going to start by pulling the GPS image in png format from google maps using the Static Maps API, then creating an ImageView.
 
This is where I got hung up. The examples I found for ImageView used image arrays created randomly at runtime, rather than from an image file. I'm not sure how to get a png image, either from a file or StringIO object, into a format that ImageView can use.
 
Are there examples of this that I'm overlooking? Otherwise, could someone give me a nudge in the right direction?
 
Thanks,
Luke M

Luke Campagnola

unread,
Feb 11, 2015, 9:07:50 AM2/11/15
to pyqt...@googlegroups.com
I recommend using QGraphicsPixmapItem inside pg.ViewBox (it sounds like ImageView is overkill for your application):

--
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 pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/583166d2-90ce-49f5-bfbb-71562c51b02d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luke M

unread,
Feb 11, 2015, 8:58:25 PM2/11/15
to pyqt...@googlegroups.com
Great, thanks for the pointer, at first glance it looks like that will get me started. I'll dig into it a bit and may have some more questions once I've had a chance to play around.

Thanks again,
Luke M
Reply all
Reply to author
Forward
0 new messages