Changeset 8232 for trunk/psLib/src/imageops/psImagePixelManip.c
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
imageops/psImagePixelManip.c (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src
- Property svn:ignore
-
old new 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg
-
- Property svn:ignore
-
trunk/psLib/src/imageops/psImagePixelManip.c
r7766 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psMemory.h" 29 29 #include "psAssert.h" 30 #include "psErrorText.h" 30 31 31 #include "psCoord.h" 32 32 … … 47 47 if (max < min) { 48 48 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 49 PS_ERRORTEXT_psImageManip_MAXMIN,49 _("Specified min value, %g, can not be greater than the specified max value, %g."), 50 50 (double)min,(double)max); 51 51 return 0; … … 61 61 if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \ 62 62 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 63 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \63 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 64 64 "vmin",vmin, PS_TYPE_##type##_NAME, \ 65 65 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 67 67 if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \ 68 68 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 69 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \69 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 70 70 "vmax",vmax, PS_TYPE_##type##_NAME, \ 71 71 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 90 90 if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \ 91 91 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 92 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \92 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 93 93 "vmin",vmin, PS_TYPE_##type##_NAME, \ 94 94 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 96 96 if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \ 97 97 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 98 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \98 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 99 99 "vmax",vmax, PS_TYPE_##type##_NAME, \ 100 100 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 132 132 PS_TYPE_NAME(typeStr,input->type.type); 133 133 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 134 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,134 _("Specified psImage type, %s, is not supported."), 135 135 typeStr); 136 136 } … … 177 177 PS_TYPE_NAME(typeStr,input->type.type); 178 178 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 179 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,179 _("Specified psImage type, %s, is not supported."), 180 180 typeStr); 181 181 } … … 202 202 if (image == NULL || overlay == NULL) { 203 203 psError(PS_ERR_BAD_PARAMETER_NULL, true, 204 PS_ERRORTEXT_psImage_IMAGE_NULL);204 _("Can not operate on a NULL psImage.")); 205 205 return pixelsOverlaid; 206 206 } … … 208 208 if (op == NULL) { 209 209 psError(PS_ERR_BAD_PARAMETER_NULL, true, 210 PS_ERRORTEXT_psImageManip_OPERATION_NULL);210 _("Operation can not be NULL.")); 211 211 return pixelsOverlaid; 212 212 } … … 220 220 PS_TYPE_NAME(typeStrOverlay,overlay->type.type); 221 221 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 222 PS_ERRORTEXT_psImageManip_OVERLAY_TYPE_MISMATCH,222 _("Input overlay psImage type, %s, must match input psImage type, %s."), 223 223 typeStrOverlay, typeStr); 224 224 return pixelsOverlaid; … … 239 239 240 240 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 241 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,241 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 242 242 x0, imageColLimit, y0, imageRowLimit, 243 243 imageNumCols, imageNumRows); … … 295 295 default: \ 296 296 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 297 PS_ERRORTEXT_psImageManip_OVERLAY_OPERATOR_INVALID, \297 _("Specified operation, '%s', is not supported."), \ 298 298 op); \ 299 299 return pixelsOverlaid; \ … … 319 319 PS_TYPE_NAME(typeStr,type); 320 320 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 321 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,321 _("Specified psImage type, %s, is not supported."), 322 322 typeStr); 323 323 return pixelsOverlaid; … … 344 344 if (input == NULL) { 345 345 psError(PS_ERR_BAD_PARAMETER_NULL, true, 346 PS_ERRORTEXT_psImage_IMAGE_NULL);346 _("Can not operate on a NULL psImage.")); 347 347 return 0; 348 348 } … … 350 350 if (realMax < realMin) { 351 351 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 352 PS_ERRORTEXT_psImageManip_MAXMIN_REAL,352 _("Specified real-portion of min value, %g, can not be greater than the real-portion of max value, %g."), 353 353 (double)realMin, (double)realMax); 354 354 return 0; … … 356 356 if (imagMax < imagMin) { 357 357 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 358 PS_ERRORTEXT_psImageManip_MAXMIN_IMAG,358 _("Specified imaginary-portion of min value, %g, can not be greater than the imaginary-portion of max value, %g."), 359 359 (double)imagMin, (double)imagMax); 360 360 return 0; … … 369 369 realfcn(vmin) > PS_MAX_##type || imagfcn(vmin) > PS_MAX_##type ) { \ 370 370 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 371 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \371 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 372 372 "vmin", creal(vmin), cimag(vmin), \ 373 373 PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \ … … 377 377 realfcn(vmax) < PS_MIN_##type || imagfcn(vmax) < PS_MIN_##type ) { \ 378 378 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 379 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \379 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 380 380 "vmax", creal(vmax), cimag(vmax), \ 381 381 PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \ … … 406 406 PS_TYPE_NAME(typeStr,input->type.type); 407 407 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 408 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,408 _("Specified psImage type, %s, is not supported."), 409 409 typeStr); 410 410 }
Note:
See TracChangeset
for help on using the changeset viewer.
