Look at TImageFormatInfo.CheckDimensions for details.
TFormatCheckDimensionsProc = procedure (Format: TImageFormat; var Width, Height: LongInt);
ImagingTypes (at line 363)