Changeset 534
- Timestamp:
- 11/03/09 23:28:07 (3 weeks ago)
- Location:
- ImageMagick/trunk
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
magick/distort.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/ChangeLog
r514 r534 1 2009-11-04 6.5.7-5 Anthony Thyssen <A.Thyssen@griffith...> 2 * Bug Fix for Polynomial distortion. which is now working. 3 1 4 2009-11-01 6.5.7-4 Cristy <quetzlzacatenango@image...> 2 5 * Use -define delegate:bimodal=true to activate any bimodal delegates. -
ImageMagick/trunk/magick/distort.c
r532 r534 349 349 fall back to Affine distortion (allowing 0 to 3 point pairs) 350 350 */ 351 if ( number_arguments < 4*cp_size && 351 if ( number_arguments < 4*cp_size && 352 352 ( *method == BilinearForwardDistortion 353 353 || *method == BilinearReverseDistortion … … 376 376 (void) ThrowMagickException(exception,GetMagickModule(),OptionError, 377 377 "InvalidArgument","%s : '%s'","Polynomial", 378 "Invalid order, should be 1 to 5, or 1.5");378 "Invalid order, should be interger 1 to 5, or 1.5"); 379 379 return((double *) NULL); 380 380 } … … 733 733 status; 734 734 735 if ( number_arguments%cp_size != 0 || 736 number_arguments < cp_size*4 ) { 737 (void) ThrowMagickException(exception,GetMagickModule(),OptionError, 738 "InvalidArgument", "%s : 'require at least %ld CPs'", 739 "Perspective", 4L); 740 coeff=(double *) RelinquishMagickMemory(coeff); 741 return((double *) NULL); 742 } 735 743 /* fake 1x8 vectors matrix directly using the coefficients array */ 736 744 vectors[0] = &(coeff[0]); … … 840 848 status; 841 849 850 /* check the number of arguments */ 851 if ( number_arguments%cp_size != 0 || 852 number_arguments < cp_size*4 ) { 853 (void) ThrowMagickException(exception,GetMagickModule(),OptionError, 854 "InvalidArgument", "%s : 'require at least %ld CPs'", 855 *method == BilinearForwardDistortion ? "BilinearForward" : 856 "BilinearReverse", 4L); 857 coeff=(double *) RelinquishMagickMemory(coeff); 858 return((double *) NULL); 859 } 842 860 /* create matrix, and a fake vectors matrix */ 843 861 matrix = AcquireMagickMatrix(4UL,4UL); … … 1003 1021 vectors[i] = &(coeff[2+i*nterms]); 1004 1022 /* Add given control point pairs for least squares solving */ 1005 for (i= 0; i < number_arguments; i+=cp_size) {1023 for (i=1; i < number_arguments; i+=cp_size) { /* NB: start = 1 not 0 */ 1006 1024 for (j=0; j < (long) nterms; j++) 1007 1025 terms[j] = poly_basis_fn(j,arguments[i+cp_x],arguments[i+cp_y]);
