Groups | Blog | Home
all groups > dotnet drawing api > may 2006 >

dotnet drawing api : Bitmap analysis


Adrian
5/24/2006 12:00:00 AM
Hi all

We are working on a large project. Main functionality is accessing database
with ado.net. A small corner of the project contains some graphics (Bitmaps)
analysis. We all know a lot about ADO.Net but not so much about graphics. So
I hope this newsgroups can point us to the right way. By browsing throgh the
Drawing Namespace we see a lot of classes and methods but don't know exactly
where to start.

We have to analyse Bitmaps for 3 things:
1. The Size of the Bitmap. It should be 23 x 23 Pixels and is 256 colour
coded
2. The Bitmap itself contains only Black and White pixels.
3. The Bitmap must have a 2-Pixel border in white color (or transparent if
this is possible for Bitmaps)

We have (only) to test for this 3 thinks. We don't need to manipulate the
bitmap!

Can you point us please to the right classes and methods (perhaps you have
some examples) to solve this?

Thank you very much for your help
Adrian
Please remove NOSPAM from my reply email address


Bob Powell [MVP]
5/24/2006 12:23:07 PM
For fast scan-line analysis ou will need to use LockBits. The GDI+ FAQ has
articles on that subject and also on how to extract a region from a bitmap.
This article shows some of the fundamentals of scan line analysis.

For a 256 colour bitmap you will need to extend the functionality a little
so that you are referencing the palette for the current pixel.

--
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.





[quoted text, click to view]

AddThis Social Bookmark Button