How to find whether an Image is Color or b/w

  • Thread starter Thread starter Chellapa
  • Start date Start date
C

Chellapa

For my ImageProcessing Application i need to find whether
an Image is Color or B/W through code for GrayScale
automation purpose, Iam using vb.net and photoshop for
developing the application.

Image Format is PNG

Can any one help in this regard.

Thanks,
Chellapandian.S
 
You didnt even answer my last reply to this question !

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Hi,

Maybe?

Dim bm As New Bitmap("C:\test.png")

If bm.PixelFormat = Imaging.PixelFormat.Format16bppGrayScale Then

Trace.WriteLine("black and white")

Else

Trace.WriteLine("Color")

End If



Ken
 
This will tell us if a picture is black and white, however, if the asnwer is
False, it still does not absolutley tell us that the picture is color.

The colour depth could be 32Million colours and the picture could still be
black and white !



--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
OHM,

You are right.

Ken
------------------
One Handed Man ( OHM - Terry Burns ) said:
This will tell us if a picture is black and white, however, if the asnwer
is
False, it still does not absolutley tell us that the picture is color.

The colour depth could be 32Million colours and the picture could still be
black and white !



--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
It's so seldom I am right, it's nice when it happens !

;-0

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Back
Top