Results 1 to 7 of 7

Thread: transparency turns to blue

  1. #1

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409

    transparency turns to blue

    im use Direct Draw in DX9 to draw to my form and windowed mode. Im trying to draw a transparency useing DrawFastFlags.SourceColorKey flag i've set the color key in the source surface to white
    Dim colorKey As ColorKey
    colorKey.ColorSpaceHighValue = 255
    colorKey.ColorSpaceHighValue = 255
    people(name).SetColorKey(ColorKeyFlags.SourceDraw, colorKey)

    and ive double checked that its white in the bitmap however when i draw it to the screen the white appears blue instaed of transparent.

    Does any one have any ideas as to why?

    thanks
    -Nate

  2. #2
    Fanatic Member
    Join Date
    Dec 2002
    Location
    North Carolina
    Posts
    734
    colorKey.ColorSpaceHighValue = 255
    colorKey.ColorSpaceHighValue = 255

    With those thats rather redundant or were you trying for this instead:

    colorKey.ColorSpaceLowValue = 255
    colorKey.ColorSpaceHighValue = 255

    I don't know if its low value exactly having never used that but would make sense =)

  3. #3

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    well yes it is but that didnt fix the problem. it seems the problem is somehow being caused by bitmap images created with the save function of the vb.net bitmap class that i used to create the images. the transparency works fine useing the exact same code with a self made image.

  4. #4
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Posted by dogfish227
    well yes it is but that didnt fix the problem. it seems the problem is somehow being caused by bitmap images created with the save function of the vb.net bitmap class that i used to create the images. the transparency works fine useing the exact same code with a self made image.
    Could you attach two identical images, one saved using each method and I'll take a look at the structure and see whats different about them .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  5. #5

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    ok

    this is the one that turns blue
    Attached Files Attached Files

  6. #6

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    this one works fine
    Attached Files Attached Files

  7. #7

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    i think the bad one may realy be in the .png format beacuse when opend with paint and then saved .png is the default file type

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width