This method of the DirectDrawSurface Class retrieves the color and pixel format of the surface.
public void getPixelFormat(DDPixelFormat pf);
pf | A DDPixelFormat object that receives a detailed description of the current pixel and color space format of the surface. |