Solved

Check if Image is Blank

Posted on 2007-03-18
1
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

733 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