A FITS dataset containing a 2-dimensional image array in the primary extension, in general NOT the same size as the input array, but containing all of the keywords (except those pertaining to DSS) of the input. Note that, where WCS keywords are found in the input image, these are adjusted correctly to correspond to the new binning scheme.
The task attempts to make the datatype of the output image the same as that of the input; however situations can arise in which this is not possible; in this case the earliest member of the sequence (int8, int16, int32, real32, real64) is chosen which can best describe the maximum value of the output.