Look at TestImage for details.
function ImTestImage(var Image: TImageData): Boolean; cdecl;
ImagingExport (at line 50)