hi please can you help me - i need to detect transparent pixels - thanks in advance. i use wpf and class image.
A:
U don't need Image class, it is not design for pixel manipulation. Rater use Bitmap* class
BitmapImage bi = new BitmapImage();
bi.BeginInit();
bi.UriSource = new Uri(@"/test.png",UriKind.RelativeOrAbsolute);
bi.EndInit();
Implement public PixelColor[,] GetPixels(BitmapSource source) method and then interate through returned array to find Alpha channel ( a simple loop). Mind that some images does not support transparency and the file vary depends on structure (ARGB, RGBA) etc.
lukas
2010-08-01 15:44:14
yes thanks. but some code there glitches. :)
in4man
2010-08-02 20:08:02
heu can you help me more - Bitmap* What class should i use? *Image not supported?
in4man
2010-08-05 18:38:56