ImageList.Add () - Could this be a Bug ?

P

Pawe³

Hi!
I have an ImageList object with one image added with VS Designer. Then,
within my code I'am trying to add some other image to the collection:

int i = imageList1.Images.Add (myImage, Color.White) ;



this throws OutOfMemoryException! imageList1 contains only one bitmap (32x32
24bit), image with the same size I wish to append, and White is selected as
the ImageList.TransparentColor.
When I use another variant of Add() method, everything works fine:

imageList1.Images.Add (myImage) ;



Why does it happen ?.. I did something wrong, or it just a CCL bug ?..

Paul
 
P

Peter Huang

Hi Paul,

I can not reproduce the problem, here is my reproduce steps.
1. Create a new windows application,
2. add an imagelist onto the form and add a picture into the imagelist
3. Create a new bitmap object with a 32X32 picture and then add it into the
imagelist with the (Color.While) as the transparent color.

Can you post a simple reproduce sample with detailed reproduce steps so
that I can do further troubleshooting about the problem?

Thanks!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top