ImageList issues...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • stumorgan@gmail.com

    #1

    ImageList issues...

    I'm trying to make a configuration menu similar to the one in the
    Firefox options screen, with an icon-based toolbar at the top. I'm
    using the ToolBar object which gets the icons from an ImageList.
    However, the PNG files that I am putting in the ImageList look all
    crappy compared to the originals. If I bring the same PNG file into a
    PictureBox it looks perfect, but in the ImageList it has a gross blue
    border and looks awful... Is there any way to fix this? I put it up
    to 32-bit coloring so it's not that... Any ideas would be well
    appreciated.

    Thanks.

  • Dave Sexton

    #2
    Re: ImageList issues...

    Hi,

    Make sure that each .png image is stored as the actual size that you want them
    to appear when they are on the button so that they don't have to be
    automatically resized by the framework.

    I'm not sure where the "blue border" is coming from, however. You might want
    to try saving them as bitmaps instead.

    --
    Dave Sexton

    <stumorgan@gmai l.comwrote in message
    news:1162485283 .734648.114480@ h48g2000cwc.goo glegroups.com.. .
    I'm trying to make a configuration menu similar to the one in the
    Firefox options screen, with an icon-based toolbar at the top. I'm
    using the ToolBar object which gets the icons from an ImageList.
    However, the PNG files that I am putting in the ImageList look all
    crappy compared to the originals. If I bring the same PNG file into a
    PictureBox it looks perfect, but in the ImageList it has a gross blue
    border and looks awful... Is there any way to fix this? I put it up
    to 32-bit coloring so it's not that... Any ideas would be well
    appreciated.
    >
    Thanks.
    >

    Comment

    • Bob Powell [MVP]

      #3
      Re: ImageList issues...

      The blue border is probably because the framework is resizing and
      interpolating the pixels at the key-colour boundaries. Try using a white or
      very light key colour.

      --
      Bob Powell [MVP]
      Visual C#, System.Drawing

      Ramuseco Limited .NET consulting


      Find great Windows Forms articles in Windows Forms Tips and Tricks


      Answer those GDI+ questions with the GDI+ FAQ


      All new articles provide code in C# and VB.NET.
      Subscribe to the RSS feeds provided and never miss a new article.



      "Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
      news:ebQA81q$GH A.2328@TK2MSFTN GP02.phx.gbl...
      Hi,
      >
      Make sure that each .png image is stored as the actual size that you want
      them to appear when they are on the button so that they don't have to be
      automatically resized by the framework.
      >
      I'm not sure where the "blue border" is coming from, however. You might
      want to try saving them as bitmaps instead.
      >
      --
      Dave Sexton
      >
      <stumorgan@gmai l.comwrote in message
      news:1162485283 .734648.114480@ h48g2000cwc.goo glegroups.com.. .
      >I'm trying to make a configuration menu similar to the one in the
      >Firefox options screen, with an icon-based toolbar at the top. I'm
      >using the ToolBar object which gets the icons from an ImageList.
      >However, the PNG files that I am putting in the ImageList look all
      >crappy compared to the originals. If I bring the same PNG file into a
      >PictureBox it looks perfect, but in the ImageList it has a gross blue
      >border and looks awful... Is there any way to fix this? I put it up
      >to 32-bit coloring so it's not that... Any ideas would be well
      >appreciated.
      >>
      >Thanks.
      >>
      >
      >

      Comment

      • Dave Sexton

        #4
        Re: ImageList issues...

        Hi Bob,

        Good point Bob - Thanks.

        But, PNG supports gradient transparency so I suspect that the OP isn't keying
        it at all. In that case the only option is to clean up the image in an editor
        so that a single key color can be used.

        --
        Dave Sexton

        "Bob Powell [MVP]" <bob@_spamkille r_.bobpowell.ne twrote in message
        news:erOdGIr$GH A.4060@TK2MSFTN GP03.phx.gbl...
        The blue border is probably because the framework is resizing and
        interpolating the pixels at the key-colour boundaries. Try using a white or
        very light key colour.
        >
        --
        Bob Powell [MVP]
        Visual C#, System.Drawing
        >
        Ramuseco Limited .NET consulting

        >
        Find great Windows Forms articles in Windows Forms Tips and Tricks

        >
        Answer those GDI+ questions with the GDI+ FAQ

        >
        All new articles provide code in C# and VB.NET.
        Subscribe to the RSS feeds provided and never miss a new article.
        >
        >
        >
        "Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
        news:ebQA81q$GH A.2328@TK2MSFTN GP02.phx.gbl...
        >Hi,
        >>
        >Make sure that each .png image is stored as the actual size that you want
        >them to appear when they are on the button so that they don't have to be
        >automaticall y resized by the framework.
        >>
        >I'm not sure where the "blue border" is coming from, however. You might
        >want to try saving them as bitmaps instead.
        >>
        >--
        >Dave Sexton
        >>
        ><stumorgan@gma il.comwrote in message
        >news:116248528 3.734648.114480 @h48g2000cwc.go oglegroups.com. ..
        >>I'm trying to make a configuration menu similar to the one in the
        >>Firefox options screen, with an icon-based toolbar at the top. I'm
        >>using the ToolBar object which gets the icons from an ImageList.
        >>However, the PNG files that I am putting in the ImageList look all
        >>crappy compared to the originals. If I bring the same PNG file into a
        >>PictureBox it looks perfect, but in the ImageList it has a gross blue
        >>border and looks awful... Is there any way to fix this? I put it up
        >>to 32-bit coloring so it's not that... Any ideas would be well
        >>appreciated .
        >>>
        >>Thanks.
        >>>
        >>
        >>
        >
        >

        Comment

        • Bob Powell [MVP]

          #5
          Re: ImageList issues...

          Hmm, what's the betting the background is transparent blue or transparent
          black?

          --
          Bob Powell [MVP]
          Visual C#, System.Drawing

          Ramuseco Limited .NET consulting


          Find great Windows Forms articles in Windows Forms Tips and Tricks


          Answer those GDI+ questions with the GDI+ FAQ


          All new articles provide code in C# and VB.NET.
          Subscribe to the RSS feeds provided and never miss a new article.



          "Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
          news:u2DhiVr$GH A.4060@TK2MSFTN GP03.phx.gbl...
          Hi Bob,
          >
          Good point Bob - Thanks.
          >
          But, PNG supports gradient transparency so I suspect that the OP isn't
          keying it at all. In that case the only option is to clean up the image
          in an editor so that a single key color can be used.
          >
          --
          Dave Sexton
          >
          "Bob Powell [MVP]" <bob@_spamkille r_.bobpowell.ne twrote in message
          news:erOdGIr$GH A.4060@TK2MSFTN GP03.phx.gbl...
          >The blue border is probably because the framework is resizing and
          >interpolatin g the pixels at the key-colour boundaries. Try using a white
          >or very light key colour.
          >>
          >--
          >Bob Powell [MVP]
          >Visual C#, System.Drawing
          >>
          >Ramuseco Limited .NET consulting
          >http://www.ramuseco.com
          >>
          >Find great Windows Forms articles in Windows Forms Tips and Tricks
          >http://www.bobpowell.net/tipstricks.htm
          >>
          >Answer those GDI+ questions with the GDI+ FAQ
          >http://www.bobpowell.net/faqmain.htm
          >>
          >All new articles provide code in C# and VB.NET.
          >Subscribe to the RSS feeds provided and never miss a new article.
          >>
          >>
          >>
          >"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
          >news:ebQA81q$G HA.2328@TK2MSFT NGP02.phx.gbl.. .
          >>Hi,
          >>>
          >>Make sure that each .png image is stored as the actual size that you
          >>want them to appear when they are on the button so that they don't have
          >>to be automatically resized by the framework.
          >>>
          >>I'm not sure where the "blue border" is coming from, however. You might
          >>want to try saving them as bitmaps instead.
          >>>
          >>--
          >>Dave Sexton
          >>>
          >><stumorgan@gm ail.comwrote in message
          >>news:11624852 83.734648.11448 0@h48g2000cwc.g ooglegroups.com ...
          >>>I'm trying to make a configuration menu similar to the one in the
          >>>Firefox options screen, with an icon-based toolbar at the top. I'm
          >>>using the ToolBar object which gets the icons from an ImageList.
          >>>However, the PNG files that I am putting in the ImageList look all
          >>>crappy compared to the originals. If I bring the same PNG file into a
          >>>PictureBox it looks perfect, but in the ImageList it has a gross blue
          >>>border and looks awful... Is there any way to fix this? I put it up
          >>>to 32-bit coloring so it's not that... Any ideas would be well
          >>>appreciate d.
          >>>>
          >>>Thanks.
          >>>>
          >>>
          >>>
          >>
          >>
          >
          >

          Comment

          • Dave Sexton

            #6
            Re: ImageList issues...

            Hi Bob,

            A bet for fun? I'm all in :)

            Seriously, though, in my experience those artifacts show up when you use
            differing levels of transparency across several colors, common along smoothed
            edges of curves. If you clean up the image like you would a GIF then the
            artifacts no longer appear, but it results in a loss of "smoothness ". I'm not
            sure that the back color matters at all.

            --
            Dave Sexton

            "Bob Powell [MVP]" <bob@_spamkille r_.bobpowell.ne twrote in message
            news:uLEom%23r$ GHA.1464@TK2MSF TNGP02.phx.gbl. ..
            Hmm, what's the betting the background is transparent blue or transparent
            black?
            >
            --
            Bob Powell [MVP]
            Visual C#, System.Drawing
            >
            Ramuseco Limited .NET consulting

            >
            Find great Windows Forms articles in Windows Forms Tips and Tricks

            >
            Answer those GDI+ questions with the GDI+ FAQ

            >
            All new articles provide code in C# and VB.NET.
            Subscribe to the RSS feeds provided and never miss a new article.
            >
            >
            >
            "Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
            news:u2DhiVr$GH A.4060@TK2MSFTN GP03.phx.gbl...
            >Hi Bob,
            >>
            >Good point Bob - Thanks.
            >>
            >But, PNG supports gradient transparency so I suspect that the OP isn't
            >keying it at all. In that case the only option is to clean up the image in
            >an editor so that a single key color can be used.
            >>
            >--
            >Dave Sexton
            >>
            >"Bob Powell [MVP]" <bob@_spamkille r_.bobpowell.ne twrote in message
            >news:erOdGIr$G HA.4060@TK2MSFT NGP03.phx.gbl.. .
            >>The blue border is probably because the framework is resizing and
            >>interpolati ng the pixels at the key-colour boundaries. Try using a white
            >>or very light key colour.
            >>>
            >>--
            >>Bob Powell [MVP]
            >>Visual C#, System.Drawing
            >>>
            >>Ramuseco Limited .NET consulting
            >>http://www.ramuseco.com
            >>>
            >>Find great Windows Forms articles in Windows Forms Tips and Tricks
            >>http://www.bobpowell.net/tipstricks.htm
            >>>
            >>Answer those GDI+ questions with the GDI+ FAQ
            >>http://www.bobpowell.net/faqmain.htm
            >>>
            >>All new articles provide code in C# and VB.NET.
            >>Subscribe to the RSS feeds provided and never miss a new article.
            >>>
            >>>
            >>>
            >>"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
            >>news:ebQA81q$ GHA.2328@TK2MSF TNGP02.phx.gbl. ..
            >>>Hi,
            >>>>
            >>>Make sure that each .png image is stored as the actual size that you want
            >>>them to appear when they are on the button so that they don't have to be
            >>>automaticall y resized by the framework.
            >>>>
            >>>I'm not sure where the "blue border" is coming from, however. You might
            >>>want to try saving them as bitmaps instead.
            >>>>
            >>>--
            >>>Dave Sexton
            >>>>
            >>><stumorgan@g mail.comwrote in message
            >>>news:1162485 283.734648.1144 80@h48g2000cwc. googlegroups.co m...
            >>>>I'm trying to make a configuration menu similar to the one in the
            >>>>Firefox options screen, with an icon-based toolbar at the top. I'm
            >>>>using the ToolBar object which gets the icons from an ImageList.
            >>>>However, the PNG files that I am putting in the ImageList look all
            >>>>crappy compared to the originals. If I bring the same PNG file into a
            >>>>PictureBo x it looks perfect, but in the ImageList it has a gross blue
            >>>>border and looks awful... Is there any way to fix this? I put it up
            >>>>to 32-bit coloring so it's not that... Any ideas would be well
            >>>>appreciated .
            >>>>>
            >>>>Thanks.
            >>>>>
            >>>>
            >>>>
            >>>
            >>>
            >>
            >>
            >
            >

            Comment

            Working...