Image Viewer Utility
A simple application based on r3showimg.h class.
The class constructs menu representing the image channels (such as color or alpha) allowing you to view any of the channels in the image
Plugins typically plug new image formats (derived from inc/real/dtype/r3dtype.h class) into this application.
The program registers image classes, loads plugins, creates the showimg window object and loads the specified image. The showimg
Note to plugin implementors: your plugins should see if the inc/real/dtype/r3imgldr.h exists before
trying to plug in new image formats into any application. The following
code demonstrates this:
#include <real/dtype/r3imgldr.h>
int R3LibraryInit(R3APP *app) {
if(R3ClassFind(R3CLID_IMAGELOADER)) {
RegisterMyFooImageClass(app);
}
return TRUE;
}
To create the showimage window class:
window = R3New(R3CLID_SHOWIMAGEWINDOW,
R3T(R3WA_Title, "my show image window"),
R3T(R3WA_SubClass, R3WASUBCL_MAINWINDOW),
R3TAG_END);
To ask the window to load an image:
R3DoA(window, R3SHOWIMGWM_LOAD, "myimages/myimage.jpg");