hai,
I’m trying to show an image in PtLabel widget here’s the code snipet:
imgStruct->image = (char *) buffer;
imgStruct = PhCreateImage(imgStruct, 320, 240, Pt_IMAGE_DIRECT_8888,
0, 0, 0);
PtSetArg( &args[0], Pt_ARG_LABEL_TYPE, Pt_IMAGE, 0);
PtSetArg( &args[1], Pt_ARG_LABEL_DATA, imgStruct, 0);
imgLabel = PtCreateWidget(PtLabel, widget,2 ,args);
buffer is the raw data from a PPM image after stripping off the
header. And i’ve taken care to declare all items imgStruct, args[],
imgLabel…
now when i try to compile it the compiler doesnot seem to recognize the
PhCreateImage() function. what could be wrong in here is some header
file or lib missing??
And i got another question what if i create a PtLabel say ‘lblImage’ and
each time i execute this code snippet i need to update the image in
lblImage… how do i refer to lblImage in PtSetResource() ?
Thankx in advance.
Krishna