PtDBContainer and truecolor

Hi,

I have the following problem :

I want to use a PtDBContainer widget to avoid flicker when I display an animation.

But if I try to display truecolor images by using PtLabel widgets, these are displayed with less
color information.
If I leave out the PtDBContainer, then the truecolor images are displayed correctly.

My question(s) :

Is the PtDBContainer widget able to display/hold PtLabel widgets with truecolor images ?

If Yes, then does it need a special setting ? I set the Pt_ARG_DB_IMAGE_TYPE to Pg_IAMGE_DIRECT_888,
without success.

Any help will be welcome.

\

Gerd Hedtke

Previously, Gerd Hedtke wrote in qdn.public.qnx4.photon:

Hi,

I have the following problem :

I want to use a PtDBContainer widget to avoid flicker when I display an animation.

But if I try to display truecolor images by using PtLabel widgets, these are displayed with less
color information.
If I leave out the PtDBContainer, then the truecolor images are displayed correctly.

My question(s) :

Is the PtDBContainer widget able to display/hold PtLabel widgets with truecolor images ?

When in PhAB if you click on the first propery listed, you
will see that PtDBContainer appears to support a full range
of image types. If you try to use the IMAGE_DIRECT_888 or
IMAGE_DIRECT_8888 you will find that it is not supported.
I’ve been told that there is better support in Photon 2.0,
but that won’t help here.

You can still get the same affect if you understand how
PtDBContainer works. Basically the widget creates a memory
context and redirects all draw events to the memory context.
When finished drawing, the memory image used is applied
directly using PgDrawImage().


Mitchell Schoenbrun --------- maschoen@pobox.com

Previously, Mitchell Schoenbrun wrote in qdn.public.qnx4.photon:

When in PhAB if you click on the first propery listed, you
will see that PtDBContainer appears to support a full range
of image types. If you try to use the IMAGE_DIRECT_888 or
IMAGE_DIRECT_8888 you will find that it is not supported.

Is this fact confirmed by QSSL ?
Is there a bugfix available for Photon 1.14 ?


\

Gerd Hedtke

Previously, Gerd Hedtke wrote in qdn.public.qnx4.photon:

Is this fact confirmed by QSSL ?

I can’t do this, I’m not an employee.


Is there a bugfix available for Photon 1.14 ?

I was told no and there won’t be.

Mitchell Schoenbrun --------- maschoen@pobox.com

Hi Mitchell,

Thank you very much for your help !


Gerd Hedtke

When in PhAB if you click on the first propery listed, you
will see that PtDBContainer appears to support a full range
of image types. If you try to use the IMAGE_DIRECT_888 or
IMAGE_DIRECT_8888 you will find that it is not supported.
I’ve been told that there is better support in Photon 2.0,
but that won’t help here.

What palette does ptdbcontainer use ?

Is it possible to set the ptdbcontainer’s palette ?

Any answer would be appreciated


Gerd Hedtke

Gerd Hedtke <NoSpam@atall.com> wrote:

When in PhAB if you click on the first propery listed, you
will see that PtDBContainer appears to support a full range
of image types. If you try to use the IMAGE_DIRECT_888 or
IMAGE_DIRECT_8888 you will find that it is not supported.
I’ve been told that there is better support in Photon 2.0,
but that won’t help here.



What palette does ptdbcontainer use ?

It really only supports one type. The widget can support two
different image types, depending on the Pt_ARG_DB_IMAGE_TYPE
resource – Pg_IMAGE_PALETTE_BYTE is the default, and the only
palette-style format. Have a look at the “New Resources” section
of the PtDBContainer docs in the Photon Widget Reference for
more.


Is it possible to set the ptdbcontainer’s palette ?

I believe what happens is that you tell the widget what type of
palette the image to be displayed will use (not that there’s
more than one type… :slight_smile: ), and then changes to the palette, if
any, would be made to the palette associated with the image
itself. So you can change the colours involved, but not their
number.

Does that help?


Norbert Black
QSSL Training Services

When in PhAB if you click on the first propery listed, you
will see that PtDBContainer appears to support a full range
of image types. If you try to use the IMAGE_DIRECT_888 or
IMAGE_DIRECT_8888 you will find that it is not supported.
I’ve been told that there is better support in Photon 2.0,
but that won’t help here.

What palette does ptdbcontainer use ?

It really only supports one type. The widget can support two
different image types, depending on the Pt_ARG_DB_IMAGE_TYPE
resource – Pg_IMAGE_PALETTE_BYTE is the default, and the only
palette-style format. Have a look at the “New Resources” section
of the PtDBContainer docs in the Photon Widget Reference for
more.

OK, so one can only display 8-bit palette based images (or all other formats will be changed before
displaying)

Is it possible to set the ptdbcontainer’s palette ?

I believe what happens is that you tell the widget what type of
palette the image to be displayed will use (not that there’s
more than one type… > :slight_smile: > ),

Are you refering here to the resource Pt_ARG_DB_IMAGE_TYPE ?

and then changes to the palette, if
any, would be made to the palette associated with the image
itself. So you can change the colours involved, but not their
number.

I tried to display a 8-bit palette based image with its own palette (shades of blue), but the
palette associated with the image was not used.
(more exact : I used PxLoadImage (…) to load the image and then assigned it to a PtLabel widget
which was generated as a child of a PtDBContainer widget)
I tried with a palette based PNG image and a 8 bit greyscale JPG, but their colors don’t display
properly.


Did I make any fault or is this another undocumented :frowning: limitation of PtDBContainer ?


Any answer would be appreciated


Gerd Hedtke