Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Controlling Image Transparency

I've noticed that the color of the pixel in the top left corner of an image in the Ribbon Control sets the transparency for the rest of the image. For example, if the top left pixel is red, then all red pixels will be 100% transparent.

Is there a way to turn this off? I have been using images that have their own transparency and sometimes I want to use that top left pixel :)

Thank you!

Comments

  • I've tried to recreate this with a PNG, but I can't seem to do so. Are you using 32-bit BMPs or something for your images?
  • I am using a PNG that was created in Paint.net. I made a test image that I am attaching. It is just a green square with a black border. The top row of pixels are red and they don't show up on the Ribbon control. Does that answer your question?
  • I've tested your image in the Ribbon control and I don't get the red border to become transparent. I see everything:



    This leads me to believe your settings are off.
  • Thank you, Don.

    Do you know what setting I might change? Are you talking about a setting in the Ribbon control or something for Windows?

    Thank you!
  • Don,
    Another update. I downloaded the image I had posted for you to test and tried it and it showed the red at the top. So, some kind of conversion happened between posting it and re-downloading it.

    This is what the two images I am testing look like in the ribbon. The one on the left is the same file I uploaded to this forum after I downloaded it from the forum to test. The red shows as expected.


    This is the image on the left.


    This is the image on the right. I made a new one with red along the top row of pixels and a red T in the middle.


    As you can see, the red pixels do not show up on the ribbon control for the image that I didn't upload and redownload.

    If you have any insight, as to why this is happening, I'd appreciate it, but I will look into it and see what I can find out. These images were made in Paint.net.

    Thanks again!
    Adam
  • Adam - I meant settings with the SRP Ribbon control. Why don't you send me the image as an attachment to
    support@srpcs.com (to avoid any conversion issues) and I'll retest.
  • I emailed the image.

    Thank you, Don!
  • Adam - The image you sent does produce the same behavior on our system as yours. Open closer inspection, we see that the file is only 24bit rather than 32bit. The image library that the SRP Ribbon control uses seems to default to traditional transparency logic (i.e., uses the upper left corner) when the there is no alpha channel in the image (which is what 32bit images provide). There is no way to "disable" transparency with the SRP Ribbon control. Therefore, your best bet is to convert the image to a 32bit file. Paint.NET should allow you to do this. Let us know if you have any further questions.
  • If you have to convert a lot of images, the SRP Image Converter could be handy, and it's free.
  • Great! That makes total sense. Thanks Don and Kevin! I really appreciate your help!
Sign In or Register to comment.