Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Opacity problems

Opacity problems

Scheduled Pinned Locked Moved C#
question
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    b43r_3oo3
    wrote on last edited by
    #1

    hello, i've got problems with opacity in my splash. Informations to the inviroment: When I start my app a splash will shown with slowly fade-in effect. Like it matters if colordepth is 32bit or 16bit, the transparent/white area of my splash (its an non symmetric pictrue and in that reason i'd set the transparencykey to "white") fades-in in black color.. it should by transparent. when i turn the colordepth to 16bit or lower, and the image opacity is 100%, the unneeded area is transparent, if it is 32bit it's white.. what do i wrong?? greetings from germany and sry of my bad english =))

    M 1 Reply Last reply
    0
    • B b43r_3oo3

      hello, i've got problems with opacity in my splash. Informations to the inviroment: When I start my app a splash will shown with slowly fade-in effect. Like it matters if colordepth is 32bit or 16bit, the transparent/white area of my splash (its an non symmetric pictrue and in that reason i'd set the transparencykey to "white") fades-in in black color.. it should by transparent. when i turn the colordepth to 16bit or lower, and the image opacity is 100%, the unneeded area is transparent, if it is 32bit it's white.. what do i wrong?? greetings from germany and sry of my bad english =))

      M Offline
      M Offline
      Martin 0
      wrote on last edited by
      #2

      Hello, Combining Transparents and Opacity doesn't work. (.Net 1.1) :(( Also had a lot of bad days because of that. What you can do is, after the "fading" is finished (opacity is 100%), you could call a method like that:

      using System.Drawing;

      public void MakeBackgroundTransparent()
      {
      Bitmap Img = new Bitmap(this.BackgroundImage);
      Img.MakeTransparent(Img.GetPixel(0,0)); //Set the coordinates to a point where the transparent color is
      this.BackgroundImage = Img;
      }

      Hope that helps, Martin

      B 1 Reply Last reply
      0
      • M Martin 0

        Hello, Combining Transparents and Opacity doesn't work. (.Net 1.1) :(( Also had a lot of bad days because of that. What you can do is, after the "fading" is finished (opacity is 100%), you could call a method like that:

        using System.Drawing;

        public void MakeBackgroundTransparent()
        {
        Bitmap Img = new Bitmap(this.BackgroundImage);
        Img.MakeTransparent(Img.GetPixel(0,0)); //Set the coordinates to a point where the transparent color is
        this.BackgroundImage = Img;
        }

        Hope that helps, Martin

        B Offline
        B Offline
        b43r_3oo3
        wrote on last edited by
        #3

        Hello Martin, thanks for fast answering. I developing with .Net 2.0 - why dosen't work? Is there a workaround? The code wouldn't work.. not at 32bit resolution.. greetings Jerry

        M 1 Reply Last reply
        0
        • B b43r_3oo3

          Hello Martin, thanks for fast answering. I developing with .Net 2.0 - why dosen't work? Is there a workaround? The code wouldn't work.. not at 32bit resolution.. greetings Jerry

          M Offline
          M Offline
          Martin 0
          wrote on last edited by
          #4

          Hello,

          b43r_3oo3 wrote:

          thanks for fast answering. I developing with .Net 2.0 - why dosen't work? Is there a workaround?

          I only know the one I told you.

          b43r_3oo3 wrote:

          The code wouldn't work.. not at 32bit resolution..

          I'm using 32bit resolution and it works for me. What I found out is that the TransparencyKey property doesn't work on every hardware with 32 bit. If you google for that problem you will find a lot of people sharing this problem. All the best, Martin

          B 1 Reply Last reply
          0
          • M Martin 0

            Hello,

            b43r_3oo3 wrote:

            thanks for fast answering. I developing with .Net 2.0 - why dosen't work? Is there a workaround?

            I only know the one I told you.

            b43r_3oo3 wrote:

            The code wouldn't work.. not at 32bit resolution..

            I'm using 32bit resolution and it works for me. What I found out is that the TransparencyKey property doesn't work on every hardware with 32 bit. If you google for that problem you will find a lot of people sharing this problem. All the best, Martin

            B Offline
            B Offline
            b43r_3oo3
            wrote on last edited by
            #5

            Thanks, why can't the Microsoft developer make their job correct as most every other developer... so far.. thanks mutch Jerry

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups