PtDBContainer question/problem

Can anyone tell me why the PtDBContainer is changing the colors of
the images that I put inside it? I’ve been struggling with this
for a few days now off and on.

Here’s what I’m trying to do. I have an area with a light shade
of purple. In this area, I need to display a progress indicator
(it’s circular). It progresses clockwise, around in a circle.
The circle gradually fills in. A “doing something” graphic is
on top of this which continually goes around the circle.

Anyway, I have a base image that is swapped out depending on the
amount of progress. It is NOT transparent and it’s background
color (in the image) is the same shade as that needed. Next, on top,
an image is overlaid for an indication that “something is happening”.
This image is transparent. Next, another transparent image is
placed on top in the middle of the others to show an indicator of
what the progress refers to.

I was having trouble with this flickering, but with the right colors
without a DBContainer. With the DBContainer, it does not flicker,
but the colors are all weird. What could be going on?

I made all of my images use the same palette. They are all .gifs
that I import into the PtLabel as my image. The color of black
is used as the transparent color and is made transparent with
the Ph?MakeTrans?() function.

Thanks in advance, this is killing me.

Please email responses in addition to posting replies for other
in the future who may have this issue.

Barry

-Barry

Hi Barry,

Would it be possible for you to send us a copy of the application that is
causing the problem for you?

Regards
Brenda


Barry Robertson <brobertson@softwareremodeling.com> wrote:

Can anyone tell me why the PtDBContainer is changing the colors of
the images that I put inside it? I’ve been struggling with this
for a few days now off and on.

Here’s what I’m trying to do. I have an area with a light shade
of purple. In this area, I need to display a progress indicator
(it’s circular). It progresses clockwise, around in a circle.
The circle gradually fills in. A “doing something” graphic is
on top of this which continually goes around the circle.

Anyway, I have a base image that is swapped out depending on the
amount of progress. It is NOT transparent and it’s background
color (in the image) is the same shade as that needed. Next, on top,
an image is overlaid for an indication that “something is happening”.
This image is transparent. Next, another transparent image is
placed on top in the middle of the others to show an indicator of
what the progress refers to.

I was having trouble with this flickering, but with the right colors
without a DBContainer. With the DBContainer, it does not flicker,
but the colors are all weird. What could be going on?

I made all of my images use the same palette. They are all .gifs
that I import into the PtLabel as my image. The color of black
is used as the transparent color and is made transparent with
the Ph?MakeTrans?() function.

Thanks in advance, this is killing me.

Please email responses in addition to posting replies for other
in the future who may have this issue.

Barry

-Barry

Previously, Barry Robertson wrote in qdn.public.qnx4.photon:

I was having trouble with this flickering, but with the right colors
without a DBContainer. With the DBContainer, it does not flicker,
but the colors are all weird. What could be going on?

I’m going to guess that you are having the same problem I
had on a project. You will notice that the first propertly
of the DBContainer listed in PhAB is the Image Type. You
are probably using the default which is IMAGE_PALETTE_BYTE.
If you are displaying palette-byte images with the same palette,
then you should not see any difference. Otherwise you probably
will. I recall that the other obvious modes, like DIRECT_888 didn’t
work at all. This was with QNX4-Photon1.14. I was told that Photon2.0
under RTP should correct some of these problems.


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

Hi Barry,

There are known problems with the DBContainer when using an palette. It
uses an 8bit palette regardless of what you set it to. Unfortunately
there is no workaround for this. You could use a Memory Context to do the
drawing in and then blit it to the screen.

Hope this helps
Regards
Brenda


Mitchell Schoenbrun <maschoen@pobox.com> wrote:

Previously, Barry Robertson wrote in qdn.public.qnx4.photon:

I was having trouble with this flickering, but with the right colors
without a DBContainer. With the DBContainer, it does not flicker,
but the colors are all weird. What could be going on?

I’m going to guess that you are having the same problem I
had on a project. You will notice that the first propertly
of the DBContainer listed in PhAB is the Image Type. You
are probably using the default which is IMAGE_PALETTE_BYTE.
If you are displaying palette-byte images with the same palette,
then you should not see any difference. Otherwise you probably
will. I recall that the other obvious modes, like DIRECT_888 didn’t
work at all. This was with QNX4-Photon1.14. I was told that Photon2.0
under RTP should correct some of these problems.

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

Hi Mitchell (and everyone else),

I have in fact used the default. None of the others worked.
They all chopped off my image. At least this one leaves
the image intact (except for the colors).

If anyone wants to play with this or see it, I have a stripped
down example that shows my problem a) with good color but with
flicker and b) with bad color, but no flicker.

I’d be happy to email my example to anyone who can help.

If anyone is good with the PmMemXX() functions, perhaps they
can provide me an example that works (got none of the free
downloads to work).

Thanks for your confirmation that something is wrong (and is
apparently outside my hands).

Barry


Mitchell Schoenbrun wrote:

Previously, Barry Robertson wrote in qdn.public.qnx4.photon:

I was having trouble with this flickering, but with the right colors
without a DBContainer. With the DBContainer, it does not flicker,
but the colors are all weird. What could be going on?

I’m going to guess that you are having the same problem I
had on a project. You will notice that the first propertly
of the DBContainer listed in PhAB is the Image Type. You
are probably using the default which is IMAGE_PALETTE_BYTE.
If you are displaying palette-byte images with the same palette,
then you should not see any difference. Otherwise you probably
will. I recall that the other obvious modes, like DIRECT_888 didn’t
work at all. This was with QNX4-Photon1.14. I was told that Photon2.0
under RTP should correct some of these problems.

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



/ /_____ Barry M. Robertson
_____ \ ______ \ __ Senior Software Consultant
/ \ | /| | Software Remodeling, Inc.
/
______ / | | | | brobertson@SoftwareRemodeling.com
/ |___| /| | Phone: 972-758-9349 Fax: 972-964-7524
/ |__| http://www.SoftwareRemodeling.com