all groups > dotnet drawing api > june 2004 >
You're in the

dotnet drawing api

group:

how to get the pixelformat


how to get the pixelformat Jeff Schumann
6/28/2004 11:17:12 AM
dotnet drawing api:
I am trying to return the pixelformat of an image that I loaded. I keep on
receiving the error message "Object reference not set to an instance of an
object." on the last line. I'm not sure what I'm doing wrong. The code is
below.

Dim i As System.Drawing.Image

i.FromFile("e:\graphics\images\test.jpg")

Label1.Text = i.PixelFormat.ToString



TIA

Jeff



Re: how to get the pixelformat Jeff Schumann
6/28/2004 11:59:47 AM
I figured it out to use bitmap instead of image.



[quoted text, click to view]

AddThis Social Bookmark Button