473,657 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2492
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*******@gmai l.comwrote in message
news:11******** **************@ 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.

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******** ******@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

<st*******@gmai l.comwrote in message
news:11******** **************@ 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.


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@_spamkille r_.bobpowell.ne twrote in message
news:er******** ******@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
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******** ******@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

<st*******@gma il.comwrote in message
news:11******* *************** @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.



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******** ******@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:er******** ******@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:eb******* *******@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

<st*******@gm ail.comwrote in message
news:11****** *************** *@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.



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@_spamkille r_.bobpowell.ne twrote in message
news:uL******** ********@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
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******** ******@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:er******* *******@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:eb****** ********@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

<st*******@g mail.comwrote in message
news:11***** *************** **@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.
>




Nov 2 '06 #6

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

Similar topics

2
3173
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 current panel status (Open/Close). Problem is that in certain complex scenarios the images disappear! from the ImageList. That is, when I call: imageList.Images, I get
2
2302
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 ImageList. But the ImageList Component supports only size upto 256x256. What is the best way to handle this?
2
8526
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 like "gcnew is undeclared error",how to deeclare 'gcnew" and when i am using in runtime to change the size of images in imagelist in listview control in .net(forms application) by chnging one trckbar(like tb1->Value),
7
2094
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 treeview control set to the imagelist containing the images I want to be displayed next to each node. It seems that no matter what I do there will be no images displayed next to the nodes during runtime. I tried creating nodes during designtime using...
4
4325
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 ImageList24 (for 24x24). I have inserted images in each and it has worked fine for months... The System.Drawing.Bitmap properties for these images are PixelFormat=32bppArgb and RawFormat=MemoryBmp with the Horiz and VerticalResolution = 96 I...
4
2192
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: Win32.Shell.SHGetFileInfo(NodePath, 256, fileinfo, cbFileInfo, flags) tvFolders.ImageList.Images.Add(Icon.FromHandle(fileinfo.hIcon)) tn.ImageIndex = tvFolders.ImageList.Images.Count - 1
6
3027
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. Save the project 3. Complied the project (successful) 4. Closed the project 5. Opened the project
2
4854
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 the ability to rotate the images and I'm having some issues. Basically, what I've tried is: lstViewImages.LargeImageList.Images.RotateFlip(RotateFlipType.Rotate90FlipNone); lstViewImages.Update();
2
3555
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 was causing memory spikes. After several hours we discovered that the ImageList.Images indexer is actually returning a copy of the added Images instead of simply returning a reference. Needless to say, we were a bit surprised and disturbed to...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.