ImageToLabel (image)
This function creates a label, strips off its borders, converts it to an image label, and applies the passed image to it.
To use this function, you must load the ImageProc.lsp library with a call to require_lisp("ImageProc.lsp").
This example, ex_ImageToLabel.g, is included in the product distribution.
#!/usr/cogent/bin/phgamma //This example puts up a window with an image label in it. PtInit(nil); require_lisp("PhotonWidgets.lsp"); require_lisp("ImageProc.lsp"); win = new(PtWindow); win.SetDim(140,140); img = PxLoadImage("smiley.bmp"); lab = ImageToLabel(img); lab.SetPos(25,25); PtRealizeWidget(win); PtMainLoop();
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.