Jeremy,
Once the image is painted on the form, there really isn't a format
anymore. The form (or rather, the windows) have a device context
associated
with them, and that device context has capabilities which limit what can
be
displayed, as well as how it is displayed.
If you want to see what the device capabilities for a device context
associated with a window are, I would get the handle for the window,
through
the Handle property. Pass that to the static FromHwnd method on the
Graphics class to get an instance of the Graphics class that represents
the
device context. Then call the GetHdc method on the Graphics instance,
this
will give you the handle to the device context.
From there, you would then call the GetDeviceCaps API function,
through
the P/Invoke layer. This will allow you to determine the bits per pixel
and
other various information.
Of course, remember to clean up properly (call ReleaseHdc on the
handle
returned from GetHdc, call IDisposable.Dispose on the Graphics instance).
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)