Solved

Check if Image is Blank

Posted on 2007-03-18
1
283 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

688 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