display image using a ptlabel

Photon 1.13, PhAB, Watcom C++ 10.6

I want to display images using one PtLabel widget. So I took the
following steps :

  • create a PtWindow widget

  • Load an image from file using PxLoadimage

  • create a PtLabel widget using PtCreateWidget as a child to the created
    window

  • set the PtLabel’s Pt_ARG_LABEL_DATA resource with the image data

  • call PtUnrealizeWidget and PtRealizeWidget for the created window to
    refresh the screen

After 3 repetitions, the above procedure crashes.

The Watcom debugger reports a “access violation” and stops at a
memalloc() call.

What is wrong ?

Is there a size limitation concerning the images of a PtLabel ? I
displayed 640x480 truecolor pictures.


Any help would be fine!

Gerd

Hi Gerd,

There shouldn’t be a size limitation. Do a ‘sin’ on the process
and see if it’s eating memory. (?)

There are memory freeing functions that you can call, as well as
using shared memory. Maybe this will help.



Gerd Hedtke <Gerd.Hedtke@t-online.de> wrote:
: Photon 1.13, PhAB, Watcom C++ 10.6

: I want to display images using one PtLabel widget. So I took the
: following steps :

: - create a PtWindow widget
: - Load an image from file using PxLoadimage
: - create a PtLabel widget using PtCreateWidget as a child to the created
: window

: - set the PtLabel’s Pt_ARG_LABEL_DATA resource with the image data
: - call PtUnrealizeWidget and PtRealizeWidget for the created window to
: refresh the screen

: After 3 repetitions, the above procedure crashes.

: The Watcom debugger reports a “access violation” and stops at a
: memalloc() call.

: What is wrong ?

: Is there a size limitation concerning the images of a PtLabel ? I
: displayed 640x480 truecolor pictures.


: Any help would be fine!

: Gerd