openframeworks/openFrameworks — pull request #1375 by markpitchless (2012-07-02 20:06:47+00:00)
Title: Feature ofxgui ofxGuiImage

Adds a widget to ofxGui for displaying images, ofxGuiImage.

I'm not sure on the name but couldn't think of a better one.

Images are bound to the widgets using a reference, either with a fixed size or just a width that calculates the correct height to preserve the aspect of the image.
```cpp
gui.add(screenshotGui.setup("Screenshot", &screenshotImage));
gui.add(grayImageGui.setup("Gray Image", (ofImage*)&grayImage, 320,240));
```
Displays the name under the image or can be setup to only show the image. This can't be changed after setup, as we need to calculate the rectangle there, so there is no accessor, only a setup argument.

Displays with a configurable border.

Also acts like a button so you can hook click events on the image.

Example updated with an image showing a screen grab. Click the image or press 'g' to grab a new image into the widget.

hth,
mark