Output Color Palette for a Bitmap : Bitmap « 2D « VB.Net






Output Color Palette for a Bitmap

Output Color Palette for a Bitmap
Imports System
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Imaging

Public Class MainClass

  Shared Sub Main()
    Dim cp As ColorPalette
    Dim bmp As Bitmap = New Bitmap("figure2.bmp")

    cp = bmp.Palette
    Dim c As Color
    For Each c In cp.Entries
      Console.WriteLine( c.ToString())
    Next
  End Sub
  
End Class




           
       








Related examples in the same category

1.Manipulate Bitmap ColorManipulate Bitmap Color
2.Bitmap Information: Width, Height, Vertical Resolution, Pixel Format, Physical DimensionBitmap Information: Width, Height, Vertical Resolution, Pixel Format, Physical Dimension
3.Draw to a Bitmap object and save it as a image file
4.Load an Image from file and draw on the loaded imageLoad an Image from file and draw on the loaded image