Added PixelFormat handling, made things public.