Question

I'm creating a Image viewer in Ubuntu using PyGTK.

However, I'm not completely aware of pygtk API.

I'm not able to figure out how can I use PyGTK to

  1. access click point coordinates on an Image
  2. read a pixel value.
Was it helpful?

Solution

I don't think you will be able to do manipulate images in the way you want with the APIs given by PyGTK.
For accessing image data, I recommend looking at the Python Imaging Library (PIL).
If you're a beginner with GTK, don't miss the tutorial of the Gnome Developer Center. There is even an example for an image viewer.
Furthermore, please keep in mind that recent applications for Ubuntu are written in GTK 3. Many many examples you find on the internet are still for PyGTK 2.x and you're not encouraged to use code from them (in case you're getting them to work).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top