Passing a ColorPalette as an argument

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I have finally figured out how to create transparency in GIF files when
creating them with VB.NET (it is harder than I think it should be, but at
least I can do it now). I would like to write a couple functions and/or
subroutines to make this easier. However, when I pass a Bitmap as a
parameter it does not include the data from the Palette property. I have
also tried passing the Palette as a separate argument, but the same problem
occurred. I cannot write a function or subroutine for creating transparency
without being able to pass the Palette. Why is the Palette not being passed,
and what can I do about it? Thanks.
 
Why is the Palette not being passed

Are you sure that the PixelFormat property of the Bitmap passed as an
argument is one of the Indexed pixel formats?

Check it before you pass it as an argument and after to be sure.
 
Back
Top