Solved

Check if Image is Blank

Posted on 2007-03-18
1
273 Views
Last Modified: 2007-03-18
Is there a way I can load an image and check if the image is blank(all white) with vb.net?
0
Comment
Question by:mxpoint
1 Comment
 
LVL 4

Accepted Solution

by:
cx323 earned 500 total points
ID: 18744523
Dim bmp As Bitmap = CType(Me.PictureBox1.Image, Bitmap) 'change to your picturebox
Dim y As Integer
Dim x As Integer
Dim bmpmaxX As Integer = bmp.Size.Width
Dim bmpmaxY As Integer = bmp.Size.Height
For x  = 0 To bmpmaxX - 1
      For y  = 0 To bmpmaxY - 1
                If Not bmp.GetPixel(x, y) = Color.White Then
                    'there's a pixel that is not white so do something else
                End If
        Next
Next
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now