Palette Problems in 256 Color Mode 
Author Message
 Palette Problems in 256 Color Mode

Hi,

I am having problems in Visual Basic 4.0 on a 256 color display.  The colors
are getting messed up by the system somehow.  Here is the situation:

- one form has a 256 color bitmap (BMP) (61 unique)
- in this form we have (at the same time) a picturebox control that
  displays an AVI animation using the MCI control

The Problem:
Once the animation starts to play the first frame of the animation, the
colors in the background picture AND the picturebox both get messed up.  For
all the other frames, the colors appear normal until it reaches the end, and
then the colors get messed up again on the last frame.

The total unique colors we have in the form is 159.. so why is Windows
messing them up?

Any help or tips would be very appreciated!  Thanks..

---
Marc Novakowski



Sun, 28 Mar 1999 03:00:00 GMT  
 Palette Problems in 256 Color Mode

Marc, you probably have 2 different palettes, one for the graphic and one
for the avi file.  Try using the Indeo palette for each of them.  This will
make sure that both files have the same palette (with all the required
windows colors).  

Hope this helps

--
Marty Pavlovic
Andersen Consulting Education
St. Charles, Illinois




Quote:
> Hi,

> I am having problems in Visual Basic 4.0 on a 256 color display.  The
colors
> are getting messed up by the system somehow.  Here is the situation:

> - one form has a 256 color bitmap (BMP) (61 unique)
> - in this form we have (at the same time) a picturebox control that
>   displays an AVI animation using the MCI control

> The Problem:
> Once the animation starts to play the first frame of the animation, the
> colors in the background picture AND the picturebox both get messed up.
For
> all the other frames, the colors appear normal until it reaches the end,
and
> then the colors get messed up again on the last frame.

> The total unique colors we have in the form is 159.. so why is Windows
> messing them up?

> Any help or tips would be very appreciated!  Thanks..

> ---
> Marc Novakowski




Sun, 28 Mar 1999 03:00:00 GMT  
 Palette Problems in 256 Color Mode


Quote:
Novakowski) writes:

>Hi,

>I am having problems in Visual Basic 4.0 on a 256 color display.  The
colors
>are getting messed up by the system somehow.  Here is the situation:

>- one form has a 256 color bitmap (BMP) (61 unique)
>- in this form we have (at the same time) a picturebox control that
>  displays an AVI animation using the MCI control

>The Problem:
>Once the animation starts to play the first frame of the animation,
the
>colors in the background picture AND the picturebox both get messed
up.  For
>all the other frames, the colors appear normal until it reaches the
end, and
>then the colors get messed up again on the last frame.

>The total unique colors we have in the form is 159.. so why is Windows
>messing them up?

>Any help or tips would be very appreciated!  Thanks..

Because the video palette doesn't match the palette of the graphic.
You can adjust the graphics to match the palette of the video by
applying the codec's unique 256 color palette.

The .pal's or .dib's of these codec's palettes are available from Intel
or Radius, or on the major online services.

Alternately, you could render the videos down to 256 color using rle
encoding, or by using MSVideo1 codec and applying the same palette as
the surrounding graphics.

Rich Mason
Stargazer Multimedia
Memphis, TN



Mon, 29 Mar 1999 03:00:00 GMT  
 Palette Problems in 256 Color Mode

If each is creating it's own palette, remapping colours in the process,
this will happen.  There is no workaround I'm aware of....it's a 256-colour
mode anomoly.
--
Randy Birch

Fidonet The Programer's Guild, Barrie, Ontario 1:252/128
Fidonet Bits & Bytes, Toronto Ontario 1:250/350



Mon, 29 Mar 1999 03:00:00 GMT  
 Palette Problems in 256 Color Mode

Quote:

>  If each is creating it's own palette, remapping colours in the process,
>  this will happen.  There is no workaround I'm aware of....it's a 256-colour
>  mode anomoly.

It is probably much more sinister than this. There is a massive bug in
the way VB4 handles 256 colour displays. The result is that it
continuously messes up the palette when more than one image is
displayed. There is a work around of sorts in the knowledge base. The
problem is VB4-16 and VB4-32 specific (i.e. not VB3).

Robert Chafer
Digital iD Picture Systems



Fri, 02 Apr 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Palette Problems in 256 Color Mode

2. Still need help with palette for 256 color mode

3. Custom palettes in 256-color mode

4. 256 Color Palette Problem

5. Using 256 color Palettes in High/True Color

6. choose a color in a 256 color palette ?

7. Change Screen Color Palette from 256 to hi-color in VB

8. Bitmap Color Palette editing-VB4 16 bit 256 color

9. Coloring a control from a 256-Color palette

10. Coloring a control from a 256-Color palette

11. color palette not accessible in 256+ color settings

12. Bitmap Color Palette editing-VB4 16 bit 256 color

 

 
Powered by phpBB® Forum Software