Re: Best way to receive pixel coordinates from image



I think that my gtk_image_viewer widget is exactly what you are looking
for. Have a look at 

    imagic.weizmann.ac.il/~dov/freesw/gtk/gtk-image-viewer/

It allows gimp-like interactive zooming and panning of an image, and
takes care of all conversions between pixel- and widget-coordinates.
It is using the gdk_pixbuf library to read the images, which means
that the ppm format is supported.

Regards,
Dov

On Thu, Jul 26, 2001 at 04:29:46PM -0000, Miguel A. Figueroa-Villanueva wrote:
> 
> Hello,
> 
> I want to create an app to display an image on screen and be able to recieve
> events such as mouse location, button pressed, etc. I is not an animation so I
> don't think it is going to be very demanding computational-wise. I would be
> reading the RGB values from a file and creating the image to be displayed
> (unless I can display a *.ppm directly). I expect to create functionality such
> as zoom, crop, etc.
> 
> I would appreciate a hint on what is the best way to go about it. I was
> thinking of using GtkImage to display a GdkImage and gdk_image_put_pixel,
> since it is not going to be a very dynamic application (i.e. not an
> animation). Can I listen for mouse coordinates and refresh the image without
> having to redraw everything (to mark an area for example).
> 
> --miguel
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

-- 
                                                                    ___
Dov Grobgeld                        | Email: dov orbotech com      /+  \  PCB
Algorithms Group Leader, Orbotech   | Phone: +972-8-9423882        \  +/  AOI
POB 215, Yavne 81102, Israel	    | Fax:   +972-8-9423775       __| |
               Disclaimer: All views above are mine alone.        ____|




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]