IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 727


Ignore:
Timestamp:
May 18, 2004, 3:20:02 PM (22 years ago)
Author:
desonia
Message:

removed psImageFreePixels.

Location:
trunk/psLib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImage.c

    r719 r727  
    77 *  @author Ross Harman, MHPCC
    88 *   
    9  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-05-18 23:26:26 $
     9 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-05-19 01:20:02 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6565void psImageFree(psImage *image)
    6666{
     67    if (image == NULL) {
     68        return;
     69    }
     70
    6771    psImageFreeChildren(image);
    68     psImageFreePixels(image);
     72
     73    psFree(image->data.v[0]);
     74    psFree(image->data.v);
     75    image->data.v = NULL;
     76
    6977    psFree(image);
    7078}
     
    166174
    167175    return (out);
    168 }
    169 
    170 void psImageFreePixels(psImage *restrict image)
    171 {
    172     if (image == NULL || image->data.v == NULL) {
    173         return;
    174     }
    175 
    176     psFree(image->data.v[0]);
    177     psFree(image->data.v);
    178     image->data.v = NULL;
    179 
    180     // xxx - is this proper?
    181     *(unsigned int*)&image->numRows = 0;
    182     *(unsigned int*)&image->numCols = 0;
    183176}
    184177
  • trunk/psLib/src/image/psImage.h

    r719 r727  
    77 *  @author Ross Harman, MHPCC
    88 *   
    9  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-05-18 23:26:26 $
     9 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-05-19 01:20:02 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    107107);
    108108
    109 /** Deallocate the image buffer of a psImage.
    110  *
    111  *  deallocates the image buffer while preserving the psImage struct and any children.
    112  *
    113  */
    114 void psImageFreePixels(
    115     psImage* restrict image             ///< psImage to free pixel memory from
    116 );
    117 
    118109/** Frees all children of a psImage.
    119110 *
  • trunk/psLib/src/mathtypes/psImage.c

    r719 r727  
    77 *  @author Ross Harman, MHPCC
    88 *   
    9  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-05-18 23:26:26 $
     9 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-05-19 01:20:02 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6565void psImageFree(psImage *image)
    6666{
     67    if (image == NULL) {
     68        return;
     69    }
     70
    6771    psImageFreeChildren(image);
    68     psImageFreePixels(image);
     72
     73    psFree(image->data.v[0]);
     74    psFree(image->data.v);
     75    image->data.v = NULL;
     76
    6977    psFree(image);
    7078}
     
    166174
    167175    return (out);
    168 }
    169 
    170 void psImageFreePixels(psImage *restrict image)
    171 {
    172     if (image == NULL || image->data.v == NULL) {
    173         return;
    174     }
    175 
    176     psFree(image->data.v[0]);
    177     psFree(image->data.v);
    178     image->data.v = NULL;
    179 
    180     // xxx - is this proper?
    181     *(unsigned int*)&image->numRows = 0;
    182     *(unsigned int*)&image->numCols = 0;
    183176}
    184177
  • trunk/psLib/src/mathtypes/psImage.h

    r719 r727  
    77 *  @author Ross Harman, MHPCC
    88 *   
    9  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-05-18 23:26:26 $
     9 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-05-19 01:20:02 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    107107);
    108108
    109 /** Deallocate the image buffer of a psImage.
    110  *
    111  *  deallocates the image buffer while preserving the psImage struct and any children.
    112  *
    113  */
    114 void psImageFreePixels(
    115     psImage* restrict image             ///< psImage to free pixel memory from
    116 );
    117 
    118109/** Frees all children of a psImage.
    119110 *
Note: See TracChangeset for help on using the changeset viewer.