Results 1 to 15 of 15

Thread: Make a bitmap image border in toolbar transparent

  1. #1

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Make a bitmap image border in toolbar transparent

    Hello guys,

    Am having a problem with the toolbar buttons in v5sp2 common controls.

    How do you make the regions of a bitmap button in the toolbar control transparent?

    I am using magenta as the background color of my bitmap icon images.

    the issue occurs when you add manifest to project files.please check the attached.
    Attached Images Attached Images  
    Last edited by coolcurrent4u; Sep 11th, 2010 at 07:38 AM.
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  2. #2
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Make a bitmap image border in toolbar transparent

    Don't see an attachment, but you might want to experiment with the
    MaskColor property in your ImageList.

  3. #3

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Make a bitmap image border in toolbar transparent

    i try the mask color, but some of the color around the image still remains any possible fix?
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  4. #4
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Make a bitmap image border in toolbar transparent

    There is a fix, but for now why don't you use .Gif with transparency?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  5. #5

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Make a bitmap image border in toolbar transparent

    if i use gif, gif uses its own transparency color in imagelist. some times black sometimes white.
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Make a bitmap image border in toolbar transparent

    I'd guess that whatever was used to create the image tried to blend the color, so some of the "magenta" is not exactly the same as the MaskColor.

  7. #7
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: Make a bitmap image border in toolbar transparent

    Quote Originally Posted by dilettante View Post
    I'd guess that whatever was used to create the image tried to blend the color, so some of the "magenta" is not exactly the same as the MaskColor.
    I think dilettante's hit the nail on the head. The app you used to create the image should have some anti-aliasing or 'feather' options which you should turn off. The image you posted clearly has been blended to a magenta background.
    Attached Images Attached Images  
    W o t . S i g

  8. #8

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Make a bitmap image border in toolbar transparent

    Just to prove some point, i have remade the icon using photoshop and a number of other software, but it is still the same as i posted before.

    i have the icon with background as 32bit, 24bit and even 8bit color depth, but no improvement.

    any tip as to software i should use or color?
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  9. #9
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Make a bitmap image border in toolbar transparent

    Quote Originally Posted by coolcurrent4u View Post
    Just to prove some point, i have remade the icon using photoshop and a number of other software, but it is still the same as i posted before.

    i have the icon with background as 32bit, 24bit and even 8bit color depth, but no improvement.

    any tip as to software i should use or color?
    Photoshop is known for blending into a background color. I've seen this many times with people that wanted to use a image created from photoshop with a magenta background (for example) as the shape of a form. Then using common methods to create a window region for the form, from the photoshop image, were disappointed the result did not match their bitmap. And here's what I told them to do to prove it, same as I'm going to suggest to you.
    1. Open your image with MS Paint
    2. Fill the magenta background color with another color, like white
    3. What does the result look like? I'm sure it will look similar to Milk's image (2 posts up)

    I do think posts 6 & 7 are the reason for the magenta edges you see. And those edges are NOT exactly magenta, but a subtle shade difference.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  10. #10

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Make a bitmap image border in toolbar transparent

    Thanks Lavolpe,

    So in situations like this what do you suggest i use.

    what to you use in making icons with manifest enabled?

    Vb does not support 8bit upwards icons, except 256, and the magenta stuff is cracking me up

    any ideas?
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  11. #11
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Make a bitmap image border in toolbar transparent

    I'm not familiar with Photoshop. As mentioned by Milk, above, I would think there would be a setting in photoshop to not anti-alias the image with the background. And that's what you want. If photoshop won't save such an image in 8 bit or lower, you might be able to bring it into MS Paint and save it as 256 colors, but MS Paint may do some color changing -- you'll have to experiment.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  12. #12
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    280

    Re: Make a bitmap image border in toolbar transparent

    For graphics I always use the Gimp. Bit complex to learn but it has every option possible once you have. Best of all it is free.
    Slower than a crippled Vista
    More buggy than a fresh XP install
    Look! Down the road, some 50 miles behind the drunken snail.
    It's Ubuntu!

  13. #13

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Make a bitmap image border in toolbar transparent

    AsmIscool

    Assuming am good at using Gimp, what you have me do to solve the problem?
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  14. #14
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Make a bitmap image border in toolbar transparent

    Have you tried just opening your BMP in MSPaint, setting the view magnification large, and then manually painting those "near magenta" pixels to either magenta or your button-edge color?

  15. #15

    Thread Starter
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Make a bitmap image border in toolbar transparent

    dilettante

    Yes i have done that, but its still the same.
    some of the edges are removed except the one the closest ones
    any more ideas
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

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