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… >
> ),
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
limitation of PtDBContainer ?
Any answer would be appreciated
–
Gerd Hedtke