IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 1, 2012, 2:12:45 PM (14 years ago)
Author:
eugene
Message:

always read into a valid 2D image, even if input FITS file is 0D, 1D, 2D, or 3D (missing dimensions have size of 1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFitsImage.c

    r32597 r33645  
    9797
    9898    /* Validate the number of axis */
    99     if ((info->nAxis < 2) || (info->nAxis > 3)) {
     99    if (info->nAxis > 3) {
    100100        psError(PS_ERR_IO, true,
    101101                _("Image number of dimensions, %d, is not supported."), info->nAxis);
     
    108108        goto bad;
    109109    }
     110
     111    info->nAxes[0] = PS_MAX (info->nAxes[0], 1);
     112    info->nAxes[1] = PS_MAX (info->nAxes[1], 1);
     113    info->nAxes[2] = PS_MAX (info->nAxes[2], 1);
    110114
    111115    info->firstPixel[0] = region.x0 + 1;
Note: See TracChangeset for help on using the changeset viewer.