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  
 Palette Problems in 256 Color Mode

Hi!
MN> The total unique colors we have in the form is 159.. so why is Windo
MN> messing them up?
Windows automatically realize the pallettes of all the objects in the
active form. I'm not sure if it's an API call to realize the pallettes
of all the forms at once. The AVI is not really in the same form as the
object where you put it, is in its own form.
Option 1 (the {*filter*}e): edit the pallettes of all the objects by hand
to make them respond to exactly the same pallette.
Option 2 (the easy one): use a 1 Mb card in 12 or more color bits

 * RM 1.31 3339 *

-----------------------------------------------------------------------------

New Age BBS - Now online! - +54(1)-797-9713 - Florida, BA - Argentina.
-----------------------------------------------------------------------------



Sun, 04 Apr 1999 03:00:00 GMT  
 
 [ 7 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