ImageToLabel

Gamma/Photon: Using Gamma™ with the Photon microGUIŽ, Version 4.0
Prev |  | Next

# `ImageToLabel`

`ImageToLabel` -- makes a label from an image.

## Syntax

    ImageToLabel (image)

## Arguments

`image`

  The image of which to make a label.

## Returns

An image label on success, otherwise nil.

## Description

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")`.

## Example

This example, `ex_ImageToLabel.g`, is included in the `gamma_ph_`#`_examples_1_QNX4.tgz` file available on the Cogent Web Site.

    #!/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();

Prev | Home | Next
`ImageThumbNail` | Up | `PgCMY`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.