473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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.

Nov 2 '06 #1
5 2473
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

<st*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.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.

Nov 2 '06 #2
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
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:eb**************@TK2MSFTNGP02.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

<st*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.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.


Nov 2 '06 #3
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@_spamkiller_.bobpowell.netwrote in message
news:er**************@TK2MSFTNGP03.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
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:eb**************@TK2MSFTNGP02.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

<st*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googleg roups.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.



Nov 2 '06 #4
Hmm, what's the betting the background is transparent blue or transparent
black?

--
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:u2**************@TK2MSFTNGP03.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@_spamkiller_.bobpowell.netwrote in message
news:er**************@TK2MSFTNGP03.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
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:eb**************@TK2MSFTNGP02.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

<st*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.google groups.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.



Nov 2 '06 #5
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@_spamkiller_.bobpowell.netwrote in message
news:uL****************@TK2MSFTNGP02.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
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:u2**************@TK2MSFTNGP03.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@_spamkiller_.bobpowell.netwrote in message
news:er**************@TK2MSFTNGP03.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
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:eb**************@TK2MSFTNGP02.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

<st*******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googl egroups.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.
>




Nov 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: A. Solomon | last post by:
Hi, I have a ImageList containing 4 bitmaps attached to a UserControl which acts as a Open/Close panel. This panel, upon click, switches the image in a PictureBox control to indicate the...
2
by: Bob C. | last post by:
Hi All, I am using the ImageList/ListView Components to display around 100 images in C#.NET. The issue i have is, some times i may need to display the thumbnail of size more then 256x256 in...
2
by: Sanjeeva Reddy | last post by:
hai Anti Keskinen, i have used the following code MyListView->LargeImageList->ImageSize = gcnew System::Drawing::Size(100, 100); // Sets large image size to 100, 100 here i am getting error...
7
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the...
4
by: David | last post by:
I have a problem that just cropped up with using an ImageList in my project I am using VB .NET 200 Problem: I have existing Form with 2 Image List controls. ImageList16 (for 16x16 Images) and...
4
by: Just Me | last post by:
If I add an image to an imagelist using imageList.Images.Add... And use it with a tree node tn.ImageIndex = imageList.Images.Count-1 This is the actual code:...
6
by: henrycortezwu | last post by:
Hi, I have a WinXPSP2, P4 3.2GHZ, 1GIG RAM on my dev machine using VS2005 VB.NET. I did the following procedure: 1. Added 82 icons (128x128 in size & 32bit Depth) in an imagelist control 2....
2
by: senfo | last post by:
I'm using a ListView control to display pictures similarly to how Windows Explorer displays pictures in "Thumbnails" view. The images are stored in an ImageList component. I would like to provide...
2
by: =?Utf-8?B?S2VuTg==?= | last post by:
We're using a System.Windows.Forms.ImageList to store a bunch of Images that I've loaded, and rendering each image in the ImageList during a draw loop. The process was running unusually slow and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.