Dim PictureWidth, PictureHeight, ColorFormat as Long 'PictureFile is string with the filename including the full path (drive and directory) PictureWidth = Image.FromFile(PictureFile).Width PictureHeight = Image.FromFile(PictureFile).Height ColorFormat = Image.FromFile(PictureFile).PixelFormat 'This function converts the pixelformat code into readable information Function ColorFormatDescription(ColorCode As Long) As String 'Function internal variable Dim Decription As String Select Case ColorCode Case 262144 : Decription = "Alpha: The pixel data contains alpha values that are not premultiplied." Case 2097152 : Decription = "Canonical: The default pixel format of 32 bits per pixel. The format spe1cifies 24-bit color depth And an 8-bit alpha channel." Case 1048576 : Decription = "Extended: Reserved" Case 397319 : Decription = "Format16bppArgb1555: The pixel format Is 16 bits per pixel. The color information specifies 32, 768 shades Of color, of which 5 bits are red, 5 bits are green, 5 bits are blue, And 1 bit Is alpha." Case 1052676 : Decription = "Format16bppGrayScale: The pixel format Is 16 bits per pixel. The color information specifies 65536 shades of gray." Case 135173 : Decription = "Format16bppRgb555: Specifies that the format Is 16 bits per pixel; 5 bits Each are used For the red, green, And blue components. The remaining bit Is Not used." Case 135174 : Decription = "Format16bppRgb565: Specifies that the format Is 16 bits per pixel; 5 bits are used For the red component, 6 bits are used For the green component, And 5 bits are used for the blue component." Case 196865 : Decription = "Format1bppIndexed: Specifies that the pixel format Is 1 bit per pixel And that it uses indexed color. The color table therefore has two colors in it." Case 137224 : Decription = "Format24bppRgb: Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components." Case 2498570 : Decription = "Format32bppArgb: Specifies that the format Is 32 bits per pixel; 8 bits Each are used For the alpha, red, green, And blue components." Case 925707 : Decription = "Format32bppPArgb: Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied, according to the alpha component." Case 139273 : Decription = "Format32bppRgb: Specifies that the format Is 32 bits per pixel; 8 bits Each are used For the red, green, And blue components. The remaining 8 bits are Not used." Case 1060976 : Decription = "Format48bppRgb: Specifies that the format is 48 bits per pixel; 16 bits each are used for the red, green, and blue components." Case 197634 : Decription = "Format4bppIndexed: Specifies that the format Is 4 bits per pixel, indexed." Case 3424269 : Decription = "Format64bppArgb: Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components." Case 1851406 : Decription = "Format64bppPArgb: Specifies that the format Is 64 bits per pixel; 16 bits Each are used For the alpha, red, green, And blue components. The red, green, And blue components are premultiplied according to the alpha component." Case 198659 : Decription = "Format8bppIndexed: Specifies that the format is 8 bits per pixel, indexed. The color table therefore has 256 colors in it." Case Else : Decription = "Unknown" End Select ColorFormatDescription = Decription End Function