Changeset 1818 for trunk/psLib/src/image/psImage.c
- Timestamp:
- Sep 16, 2004, 8:51:32 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImage.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r1653 r1818 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-0 8-28 01:18:28$12 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-09-16 18:51:31 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psImage.h" 27 28 #include "psImageErrors.h" 27 29 28 30 static void imageFree(psImage* image); … … 39 41 40 42 if (area < 1) { 41 psError (__func__,42 "Invalid value for number of rows or columns "43 "(numRows=%d, numCols=%d).",44 numRows, numCols);43 psErrorMsg(PS_ERRORNAME_DOMAIN "psImageAlloc", 44 PS_ERR_BAD_PARAMETER_VALUE, true, 45 PS_ERRORTEXT_psImage_AREA_NEGATIVE, 46 numRows, numCols); 45 47 return NULL; 46 48 } … … 128 130 129 131 if (old->type.dimen != PS_DIMEN_IMAGE) { 130 psError(__func__, 131 "Can not realloc image because input is not an image."); 132 psFree(old); 133 psErrorMsg(PS_ERRORNAME_DOMAIN "psImageRecycle", 134 PS_ERR_BAD_PARAMETER_TYPE, true, 135 PS_ERRORTEXT_psImage_NOT_AN_IMAGE); 132 136 return NULL; 133 137 } … … 214 218 215 219 if (input == NULL) { 216 psError(__func__, "Image can not be NULL."); 220 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", 221 PS_ERR_BAD_PARAMETER_NULL,true, 222 PS_ERRORTEXT_psImage_IMAGE_NULL); 217 223 return unexposedValue; 218 224 } 219 #define PSIMAGE_PIXEL_INTERPOLATE_CASE(TYPE) \ 220 case PS_TYPE_##TYPE: \ 221 switch (mode) { \ 222 case PS_INTERPOLATE_FLAT: \ 223 return p_psImagePixelInterpolateFLAT_##TYPE(input,x,y,unexposedValue); \ 224 break; \ 225 case PS_INTERPOLATE_BILINEAR: \ 226 return p_psImagePixelInterpolateBILINEAR_##TYPE(input,x,y,unexposedValue); \ 227 break; \ 228 default: \ 229 psError(__func__,"Unsupported interpolation mode (#%d)",mode); \ 230 } \ 225 226 #define PSIMAGE_PIXEL_INTERPOLATE_CASE(TYPE) \ 227 case PS_TYPE_##TYPE: \ 228 switch (mode) { \ 229 case PS_INTERPOLATE_FLAT: \ 230 return p_psImagePixelInterpolateFLAT_##TYPE(input, x, y, \ 231 unexposedValue); \ 232 break; \ 233 case PS_INTERPOLATE_BILINEAR: \ 234 return p_psImagePixelInterpolateBILINEAR_##TYPE(input,x,y, \ 235 unexposedValue); \ 236 break; \ 237 default: \ 238 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", \ 239 PS_ERR_BAD_PARAMETER_VALUE,true, \ 240 PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID, \ 241 mode); \ 242 } \ 231 243 break 232 244 … … 245 257 PSIMAGE_PIXEL_INTERPOLATE_CASE(C64); 246 258 default: 247 psError(__func__, "Unsupported image datatype (%d)", input->type.type); 259 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", 260 PS_ERR_BAD_PARAMETER_TYPE,true, 261 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, 262 input->type.type); 248 263 } 249 264
Note:
See TracChangeset
for help on using the changeset viewer.
