Stuby085

I'm trying to make a custom control that acts like a paint program for the most part. I also would like to be able to load bitmaps and use a transparency color. I can do both seperately but I question doing both at once. My question is how can I paint only on the transparent pixels of the image


Re: Visual C# General Drawing Only On Transparent Pixels

Stuby085

I forgot to mention the way that I currently get them. I use for loops to cycle through each pixel of the Bitmap using the GetPixel(int,int) method. If the color returned is equal to the transparent pixel I add the pixel to an array of Point type. I'm really asking if there is a better way to perform this action. I've narrowed the problem down to the GetPixel(int,int) call. It's by far too slow. I'm working on another class that will use unsafe pointer operations, is this the path to take