82 #if defined(MAGICKCORE_LQR_DELEGATE) 159 const double cosine = cos((
double) (
MagickPI*x));
161 return(0.34+cosine*(0.5+cosine*0.16));
175 const double cosine = cos((
double) (
MagickPI*x));
176 const double sine=sqrt(1.0-cosine*cosine);
178 return((1.0-x)*cosine+(1.0/
MagickPI)*sine);
249 if (resize_filter->
support <= 2.0)
255 return(((x-9.0/5.0)*x-1.0/5.0)*x+1.0);
257 return(((-1.0/3.0*(x-1.0)+4.0/5.0)*(x-1.0)-7.0/15.0)*(x-1.0));
260 if (resize_filter->
support <= 3.0)
266 return(((13.0/11.0*x-453.0/209.0)*x-3.0/209.0)*x+1.0);
268 return(((-6.0/11.0*(x-1.0)+270.0/209.0)*(x-1.0)-156.0/209.0)*(x-1.0));
270 return(((1.0/11.0*(x-2.0)-45.0/209.0)*(x-2.0)+26.0/209.0)*(x-2.0));
277 return(((49.0/41.0*x-6387.0/2911.0)*x-3.0/2911.0)*x+1.0);
279 return(((-24.0/41.0*(x-1.0)+4032.0/2911.0)*(x-1.0)-2328.0/2911.0)*(x-1.0));
281 return(((6.0/41.0*(x-2.0)-1008.0/2911.0)*(x-2.0)+582.0/2911.0)*(x-2.0));
283 return(((-1.0/41.0*(x-3.0)+168.0/2911.0)*(x-3.0)-97.0/2911.0)*(x-3.0));
319 return(exp((
double)(-resize_filter->
coefficient[1]*x*x)));
322 static double Hann(
const double x,
329 const double cosine = cos((
double) (
MagickPI*x));
331 return(0.5+0.5*cosine);
341 const double cosine = cos((
double) (
MagickPI*x));
343 return(0.54+0.46*cosine);
346 static double Jinc(
const double x,
379 sqrt((
double) (1.0-x*x))));
404 if (x > resize_filter->
support)
409 for (i=0; i < order; i++)
411 value*=(n-i-x)/(n-i);
426 return(0.5*(x-1.5)*(x-1.5));
430 static double Sinc(
const double x,
441 const double alpha=(double) (
MagickPI*x);
442 return(sin((
double) alpha)/alpha);
444 return((
double) 1.0);
478 const double alpha=(double) (
MagickPI*x);
479 return(sin((
double) alpha)/alpha);
485 const double xx = x*x;
486 #if MAGICKCORE_QUANTUM_DEPTH <= 8 490 const double c0 = 0.173610016489197553621906385078711564924e-2L;
491 const double c1 = -0.384186115075660162081071290162149315834e-3L;
492 const double c2 = 0.393684603287860108352720146121813443561e-4L;
493 const double c3 = -0.248947210682259168029030370205389323899e-5L;
494 const double c4 = 0.107791837839662283066379987646635416692e-6L;
495 const double c5 = -0.324874073895735800961260474028013982211e-8L;
496 const double c6 = 0.628155216606695311524920882748052490116e-10L;
497 const double c7 = -0.586110644039348333520104379959307242711e-12L;
499 c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*c7))))));
500 return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)*p);
501 #elif MAGICKCORE_QUANTUM_DEPTH <= 16 505 const double c0 = 0.173611107357320220183368594093166520811e-2L;
506 const double c1 = -0.384240921114946632192116762889211361285e-3L;
507 const double c2 = 0.394201182359318128221229891724947048771e-4L;
508 const double c3 = -0.250963301609117217660068889165550534856e-5L;
509 const double c4 = 0.111902032818095784414237782071368805120e-6L;
510 const double c5 = -0.372895101408779549368465614321137048875e-8L;
511 const double c6 = 0.957694196677572570319816780188718518330e-10L;
512 const double c7 = -0.187208577776590710853865174371617338991e-11L;
513 const double c8 = 0.253524321426864752676094495396308636823e-13L;
514 const double c9 = -0.177084805010701112639035485248501049364e-15L;
516 c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*(c7+xx*(c8+xx*c9))))))));
517 return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)*p);
522 const double c0 = 0.173611111110910715186413700076827593074e-2L;
523 const double c1 = -0.289105544717893415815859968653611245425e-3L;
524 const double c2 = 0.206952161241815727624413291940849294025e-4L;
525 const double c3 = -0.834446180169727178193268528095341741698e-6L;
526 const double c4 = 0.207010104171026718629622453275917944941e-7L;
527 const double c5 = -0.319724784938507108101517564300855542655e-9L;
528 const double c6 = 0.288101675249103266147006509214934493930e-11L;
529 const double c7 = -0.118218971804934245819960233886876537953e-13L;
531 c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*c7))))));
532 const double d0 = 1.0L;
533 const double d1 = 0.547981619622284827495856984100563583948e-1L;
534 const double d2 = 0.134226268835357312626304688047086921806e-2L;
535 const double d3 = 0.178994697503371051002463656833597608689e-4L;
536 const double d4 = 0.114633394140438168641246022557689759090e-6L;
537 const double q = d0+xx*(d1+xx*(d2+xx*(d3+xx*d4)));
538 return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)/q*p);
883 {
CubicBC, 2.0, 1.1685777620836932,
886 {
CubicBC, 2.0, 1.105822933719019,
928 assert(image != (
const Image *) NULL);
937 (void) memset(resize_filter,0,
sizeof(*resize_filter));
941 filter_type=mapping[filter].filter;
942 window_type=mapping[filter].window;
943 resize_filter->
blur=1.0;
964 if (artifact != (
const char *) NULL)
975 if (artifact != (
const char *) NULL)
991 resize_filter->
filter=filters[filter_type].function;
992 resize_filter->
support=filters[filter_type].support;
994 resize_filter->
window=filters[window_type].function;
996 resize_filter->
scale=filters[window_type].scale;
1001 switch (filter_type)
1021 switch (filter_type)
1024 resize_filter->
blur *= 0.9812505644269356;
1027 resize_filter->
blur *= 0.9549963639785485;
1043 if (artifact != (
const char *) NULL)
1051 resize_filter->
support *= 2*value;
1059 if (artifact != (
const char *) NULL)
1062 if (artifact != (
const char *) NULL)
1065 if (artifact != (
const char *) NULL)
1075 if (artifact != (
const char *) NULL)
1083 resize_filter->
support=(double) lobes;
1090 if (resize_filter->
support > 16)
1091 resize_filter->
support=jinc_zeros[15];
1093 resize_filter->
support=jinc_zeros[((long) resize_filter->
support)-1];
1098 resize_filter->
blur*=floor(resize_filter->
support)/
1105 if (artifact != (
const char *) NULL)
1113 if (artifact != (
const char *) NULL)
1121 if (artifact != (
const char *) NULL)
1136 B=filters[filter_type].B;
1137 C=filters[filter_type].C;
1138 if (filters[window_type].
function ==
CubicBC)
1140 B=filters[window_type].B;
1141 C=filters[window_type].C;
1144 if (artifact != (
const char *) NULL)
1149 if (artifact != (
const char *) NULL)
1155 if (artifact != (
const char *) NULL)
1181 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1212 "# Resampling Filter (for graphing)\n#\n");
1238 for (x=0.0; x <= support; x+=0.01f)
1250 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1253 return(resize_filter);
1291 const size_t columns,
const size_t rows,
ExceptionInfo *exception)
1298 return(resize_image);
1341 static double I0(
double x)
1360 t*=y/((double) i*i);
1366 static double J1(
double x)
1378 0.581199354001606143928050809e+21,
1379 -0.6672106568924916298020941484e+20,
1380 0.2316433580634002297931815435e+19,
1381 -0.3588817569910106050743641413e+17,
1382 0.2908795263834775409737601689e+15,
1383 -0.1322983480332126453125473247e+13,
1384 0.3413234182301700539091292655e+10,
1385 -0.4695753530642995859767162166e+7,
1386 0.270112271089232341485679099e+4
1390 0.11623987080032122878585294e+22,
1391 0.1185770712190320999837113348e+20,
1392 0.6092061398917521746105196863e+17,
1393 0.2081661221307607351240184229e+15,
1394 0.5243710262167649715406728642e+12,
1395 0.1013863514358673989967045588e+10,
1396 0.1501793594998585505921097578e+7,
1397 0.1606931573481487801970916749e+4,
1403 for (i=7; i >= 0; i--)
1412 static double P1(
double x)
1424 0.352246649133679798341724373e+5,
1425 0.62758845247161281269005675e+5,
1426 0.313539631109159574238669888e+5,
1427 0.49854832060594338434500455e+4,
1428 0.2111529182853962382105718e+3,
1429 0.12571716929145341558495e+1
1433 0.352246649133679798068390431e+5,
1434 0.626943469593560511888833731e+5,
1435 0.312404063819041039923015703e+5,
1436 0.4930396490181088979386097e+4,
1437 0.2030775189134759322293574e+3,
1443 for (i=4; i >= 0; i--)
1445 p=p*(8.0/x)*(8.0/x)+Pone[i];
1446 q=q*(8.0/x)*(8.0/x)+Qone[i];
1452 static double Q1(
double x)
1464 0.3511751914303552822533318e+3,
1465 0.7210391804904475039280863e+3,
1466 0.4259873011654442389886993e+3,
1467 0.831898957673850827325226e+2,
1468 0.45681716295512267064405e+1,
1469 0.3532840052740123642735e-1
1473 0.74917374171809127714519505e+4,
1474 0.154141773392650970499848051e+5,
1475 0.91522317015169922705904727e+4,
1476 0.18111867005523513506724158e+4,
1477 0.1038187585462133728776636e+3,
1483 for (i=4; i >= 0; i--)
1485 p=p*(8.0/x)*(8.0/x)+Pone[i];
1486 q=q*(8.0/x)*(8.0/x)+Qone[i];
1504 q=sqrt((
double) (2.0/(
MagickPI*x)))*(
P1(x)*(1.0/sqrt(2.0)*(sin(x)-
1505 cos(x)))-8.0/x*
Q1(x)*(-1.0/sqrt(2.0)*(sin(x)+cos(x))));
1539 return(resize_filter);
1578 return(resize_filter->
blur);
1585 return(resize_filter->
scale);
1616 return(resize_filter->
support*resize_filter->
blur);
1665 scale=resize_filter->
scale;
1666 scale=resize_filter->
window(x_blur*scale,resize_filter);
1668 weight=scale*resize_filter->
filter(x_blur,resize_filter);
1709 #define InterpolativeResizeImageTag "Resize/Image" 1733 assert(image != (
const Image *) NULL);
1739 if ((columns == 0) || (rows == 0))
1741 if ((columns == image->
columns) && (rows == image->
rows))
1744 if (resize_image == (
Image *) NULL)
1745 return((
Image *) NULL);
1749 return((
Image *) NULL);
1756 scale.
y=(
double) image->
rows/resize_image->
rows;
1757 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1758 #pragma omp parallel for schedule(static) shared(progress,status) \ 1759 magick_number_threads(image,resize_image,resize_image->rows,1) 1761 for (y=0; y < (ssize_t) resize_image->
rows; y++)
1778 offset.
y=((double) y+0.5)*scale.
y-0.5;
1779 for (x=0; x < (ssize_t) resize_image->
columns; x++)
1799 offset.
x=((double) x+0.5)*scale.
x-0.5;
1801 offset.
x,offset.
y,q,exception);
1814 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1828 return(resize_image);
1830 #if defined(MAGICKCORE_LQR_DELEGATE) 1867 const size_t rows,
const double delta_x,
const double rigidity,
1870 #define LiquidRescaleImageTag "Rescale/Image" 1908 assert(image != (
const Image *) NULL);
1914 if ((columns == 0) || (rows == 0))
1916 if ((columns == image->
columns) && (rows == image->
rows))
1918 if ((columns <= 2) || (rows <= 2))
1923 return((
Image *) NULL);
1928 for (y=0; y < (ssize_t) image->
rows; y++)
1939 if (p == (
const Quantum *) NULL)
1944 for (x=0; x < (ssize_t) image->
columns; x++)
1955 carver=lqr_carver_new_ext(pixels,(
int) image->
columns,(
int) image->
rows,
1957 if (carver == (LqrCarver *) NULL)
1962 lqr_carver_set_preserve_input_image(carver);
1963 lqr_status=lqr_carver_init(carver,(
int) delta_x,rigidity);
1964 lqr_status=lqr_carver_resize(carver,(
int) columns,(
int) rows);
1966 rescale_image=
CloneImage(image,lqr_carver_get_width(carver),
1967 lqr_carver_get_height(carver),
MagickTrue,exception);
1968 if (rescale_image == (
Image *) NULL)
1971 return((
Image *) NULL);
1977 return((
Image *) NULL);
1980 (void) lqr_carver_scan_reset(carver);
1981 while (lqr_carver_scan_ext(carver,&x_offset,&y_offset,(
void **) &packet) != 0)
2016 lqr_carver_destroy(carver);
2017 return(rescale_image);
2025 assert(image != (
const Image *) NULL);
2032 "DelegateLibrarySupportNotBuiltIn",
"'%s' (LQR)",image->
filename);
2033 return((
Image *) NULL);
2064 Quantum *destination,
const ssize_t destination_offset,
const size_t channels)
2069 for (i=0; i < (ssize_t) channels; i++)
2070 destination[channels*destination_offset+i]=source[source_offset*channels+i];
2074 const size_t source_size,
Quantum *destination,
2075 const ssize_t destination_offset,
const size_t channels)
2083 for (i=0; i < (ssize_t) channels; i++)
2089 for (j=0; j < (ssize_t) source_size; j++)
2090 sum+=source[source_offset[j]*channels+i];
2091 destination[channels*destination_offset+i]=(
Quantum) (sum/source_size);
2096 const ssize_t source_offset1,
const ssize_t source_offset2,
2097 Quantum *destination,
const ssize_t destination_offset,
const size_t channels)
2100 offsets[2] = { source_offset1, source_offset2 };
2102 MixPixels(source,offsets,2,destination,destination_offset,channels);
2106 const Quantum *source2,ssize_t offset2,
const size_t channels)
2113 for (i=0; i < (ssize_t) channels; i++)
2114 if (source1[offset1+i] != source2[offset2+i])
2120 Quantum *result,
const size_t channels)
2126 for (i=0; i < 4; i++)
2143 Quantum *destination,
const ssize_t destination_offset,
const size_t channels,
2144 const ssize_t e,
const ssize_t a,
const ssize_t b,
const ssize_t d,
2145 const ssize_t f,
const ssize_t h)
2147 #define caseA(N,A,B,C,D) \ 2151 offsets[4] = { A, B, C, D }; \ 2153 MixPixels(source,offsets,4,destination,destination_offset,channels);\ 2156 #define caseB(N,A,B,C,D,E,F,G,H) \ 2160 offsets[8] = { A, B, C, D, E, F, G, H }; \ 2162 MixPixels(source,offsets,8,destination,destination_offset,channels);\ 2170 CopyPixels(source,e,destination,destination_offset,channels);
2179 caseB(7,e,e,e,e,e,b,b,d)
2180 caseB(8,e,e,e,e,e,d,d,b)
2181 caseB(9,e,e,e,e,e,e,d,b)
2182 caseB(10,e,e,d,d,d,b,b,b)
2186 offsets[16] = { e, e, e, e, e, e, e, e, e, e, e, e, e, e, d, b };
2188 MixPixels(source,offsets,16,destination,destination_offset,channels);
2196 offsets[4] = { e, e, d, b };
2198 MixPixels(source,offsets,4,destination,destination_offset,channels);
2201 CopyPixels(source,e,destination,destination_offset,channels);
2209 offsets[8] = { e, e, d, d, d, b, b, b };
2211 MixPixels(source,offsets,8,destination,destination_offset,channels);
2214 CopyPixels(source,e,destination,destination_offset,channels);
2222 offsets[16] = { e, e, e, e, e, e, e, e, e, e, e, e, e, e, d, b };
2224 MixPixels(source,offsets,16,destination,destination_offset,channels);
2227 CopyPixels(source,e,destination,destination_offset,channels);
2235 offsets[4] = { e, e, d, b };
2237 MixPixels(source,offsets,4,destination,destination_offset,channels);
2242 offsets[4] = { e, e, e, a };
2244 MixPixels(source,offsets,4,destination,destination_offset,channels);
2253 offsets[8] = { e, e, e, e, e, e, d, b };
2255 MixPixels(source,offsets,8,destination,destination_offset,channels);
2260 offsets[4] = { e, e, e, a };
2262 MixPixels(source,offsets,4,destination,destination_offset,channels);
2271 offsets[8] = { e, e, d, d, d, b, b, b };
2273 MixPixels(source,offsets,8,destination,destination_offset,channels);
2278 offsets[4] = { e, e, e, a };
2280 MixPixels(source,offsets,4,destination,destination_offset,channels);
2289 offsets[8] = { e, e, e, e, e, b, b, d };
2291 MixPixels(source,offsets,8,destination,destination_offset,channels);
2296 offsets[4] = { e, e, e, d };
2298 MixPixels(source,offsets,4,destination,destination_offset,channels);
2307 offsets[8] = { e, e, e, e, e, d, d, b };
2309 MixPixels(source,offsets,8,destination,destination_offset,channels);
2314 offsets[4] = { e, e, e, b };
2316 MixPixels(source,offsets,4,destination,destination_offset,channels);
2336 for (i=7; i >= 0; i--)
2338 result+=order*pattern[i];
2345 Quantum *result,
const size_t channels)
2347 static const unsigned int 2350 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 15, 12, 5, 3, 17, 13,
2351 4, 4, 6, 18, 4, 4, 6, 18, 5, 3, 12, 12, 5, 3, 1, 12,
2352 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 17, 13, 5, 3, 16, 14,
2353 4, 4, 6, 18, 4, 4, 6, 18, 5, 3, 16, 12, 5, 3, 1, 14,
2354 4, 4, 6, 2, 4, 4, 6, 2, 5, 19, 12, 12, 5, 19, 16, 12,
2355 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 16, 12,
2356 4, 4, 6, 2, 4, 4, 6, 2, 5, 19, 1, 12, 5, 19, 1, 14,
2357 4, 4, 6, 2, 4, 4, 6, 18, 5, 3, 16, 12, 5, 19, 1, 14,
2358 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 15, 12, 5, 3, 17, 13,
2359 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 16, 12,
2360 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 17, 13, 5, 3, 16, 14,
2361 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 13, 5, 3, 1, 14,
2362 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 16, 13,
2363 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 1, 12,
2364 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 1, 14,
2365 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 1, 12, 5, 3, 1, 14
2381 #define Rotated(p) p[2], p[4], p[7], p[1], p[6], p[0], p[3], p[5] 2382 const int pattern2[] = {
Rotated(pattern1) };
2383 const int pattern3[] = {
Rotated(pattern2) };
2384 const int pattern4[] = {
Rotated(pattern3) };
2388 channels,4,0,1,3,5,7);
2390 channels,4,2,5,1,7,3);
2392 channels,4,8,7,5,3,1);
2394 channels,4,6,3,7,1,5);
2398 const size_t channels)
2400 #define Corner(A,B,C,D) \ 2402 if (intensities[B] > intensities[A]) \ 2405 offsets[3] = { B, C, D }; \ 2407 MixPixels(pixels,offsets,3,result,3,channels); \ 2412 offsets[3] = { A, B, C }; \ 2414 MixPixels(pixels,offsets,3,result,3,channels); \ 2418 #define Line(A,B,C,D) \ 2420 if (intensities[C] > intensities[A]) \ 2421 Mix2Pixels(pixels,C,D,result,3,channels); \ 2423 Mix2Pixels(pixels,A,B,result,3,channels); \ 2427 pixels_offsets[4] = { 0, 1, 3, 4 };
2443 for (i=0; i < 9; i++)
2446 CopyPixels(pixels,(ssize_t) (intensities[0] > intensities[1] ? 0 : 1),result,
2448 CopyPixels(pixels,(ssize_t) (intensities[0] > intensities[3] ? 0 : 3),result,
2461 if (ad && de && !ab)
2466 if (be && de && !ab)
2471 if (ad && ab && !be)
2476 if (ab && be && !ad)
2481 if (ae && (!bd || intensities[1] > intensities[0]))
2486 if (bd && (!ae || intensities[0] > intensities[1]))
2511 MixPixels(pixels,pixels_offsets,4,result,3,channels);
2517 Quantum *result,
const size_t channels)
2519 #define WeightVar(M,N) const int w_##M##_##N = \ 2520 PixelsEqual(pixels,M,pixels,N,channels) ? 0 : 1; 2555 w_12_16 + w_12_8 + w_6_10 + w_6_2 + (4 * w_11_7) <
2556 w_11_17 + w_11_5 + w_7_13 + w_7_1 + (4 * w_12_6)
2558 Mix2Pixels(pixels,(ssize_t) (w_12_11 <= w_12_7 ? 11 : 7),12,result,0,
2563 w_12_18 + w_12_6 + w_8_14 + w_8_2 + (4 * w_7_13) <
2564 w_13_17 + w_13_9 + w_11_7 + w_7_3 + (4 * w_12_8)
2566 Mix2Pixels(pixels,(ssize_t) (w_12_7 <= w_12_13 ? 7 : 13),12,result,1,
2571 w_12_6 + w_12_18 + w_16_10 + w_16_22 + (4 * w_11_17) <
2572 w_11_7 + w_11_15 + w_13_17 + w_17_21 + (4 * w_12_16)
2574 Mix2Pixels(pixels,(ssize_t) (w_12_11 <= w_12_17 ? 11 : 17),12,result,2,
2579 w_12_8 + w_12_16 + w_18_14 + w_18_22 + (4 * w_13_17) <
2580 w_11_17 + w_17_23 + w_17_19 + w_7_13 + (4 * w_12_18)
2582 Mix2Pixels(pixels,(ssize_t) (w_12_13 <= w_12_17 ? 13 : 17),12,result,3,
2589 Quantum *result,
const size_t channels)
2599 for (i=0; i < 4; i++)
2622 Quantum *result,
const size_t channels)
2624 #define HelperCond(a,b,c,d,e,f,g) ( \ 2625 PixelsEqual(pixels,a,pixels,b,channels) && ( \ 2626 PixelsEqual(pixels,c,pixels,d,channels) || \ 2627 PixelsEqual(pixels,c,pixels,e,channels) || \ 2628 PixelsEqual(pixels,a,pixels,f,channels) || \ 2629 PixelsEqual(pixels,b,pixels,g,channels) \ 2638 for (i=0; i < 4; i++)
2687 corner_tl=
PixelsEqual(pixels,0,pixels,1,channels) &&
2689 corner_tr=
PixelsEqual(pixels,1,pixels,2,channels) &&
2691 corner_bl=
PixelsEqual(pixels,3,pixels,6,channels) &&
2693 corner_br=
PixelsEqual(pixels,5,pixels,7,channels) &&
2695 CopyPixels(pixels,(ssize_t) (corner_tl ? 0 : 4),result,0,channels);
2696 if (corner_tl && corner_tr)
2700 CopyPixels(pixels,(ssize_t) (corner_tr ? 1 : 4),result,2,channels);
2701 if (corner_tl && corner_bl)
2706 if (corner_tr && corner_br)
2710 CopyPixels(pixels,(ssize_t) (corner_bl ? 3 : 4),result,6,channels);
2711 if (corner_bl && corner_br)
2715 CopyPixels(pixels,(ssize_t) (corner_br ? 5 : 4),result,8,channels);
2729 corner_tl=
PixelsEqual(pixels,0,pixels,1,channels) &&
2731 corner_tr=
PixelsEqual(pixels,1,pixels,2,channels) &&
2733 corner_bl=
PixelsEqual(pixels,3,pixels,6,channels) &&
2735 corner_br=
PixelsEqual(pixels,5,pixels,7,channels) &&
2737 CopyPixels(pixels,(ssize_t) (corner_tl ? 0 : 4),result,0,channels);
2739 CopyPixels(pixels,(ssize_t) (corner_tr ? 1 : 4),result,2,channels);
2743 CopyPixels(pixels,(ssize_t) (corner_bl ? 3 : 4),result,6,channels);
2745 CopyPixels(pixels,(ssize_t) (corner_br ? 5 : 4),result,8,channels);
2832 for (i=0; i < 9; i++)
2839 #define MagnifyImageTag "Magnify/Image" 2877 assert(image != (
const Image *) NULL);
2884 if (option == (
char *) NULL)
2938 scaling_method=
Hq2X;
2967 scaling_method=
Xbr2X;
2981 if (source_image == (
Image *) NULL)
2982 return((
Image *) NULL);
2989 (void)
CopyImagePixels(source_image,image,&rectangle,&offset,exception);
2993 if (magnify_image == (
Image *) NULL)
2996 return((
Image *) NULL);
3005 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3006 #pragma omp parallel for schedule(static) shared(progress,status) \ 3007 magick_number_threads(source_image,magnify_image,source_image->rows,1) 3009 for (y=0; y < (ssize_t) source_image->
rows; y++)
3023 magnify_image->
columns,magnification,exception);
3032 for (x=0; x < (ssize_t) source_image->
columns; x++)
3049 scaling_method(source_image,p,r,channels);
3053 for (j=0; j < (ssize_t) magnification; j++)
3054 for (i=0; i < (ssize_t) (channels*magnification); i++)
3055 q[j*channels*magnify_image->
columns+i]=r[j*magnification*channels+i];
3065 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3079 return(magnify_image);
3112 assert(image != (
Image *) NULL);
3120 return(minify_image);
3160 #define ResampleImageTag "Resample/Image" 3172 assert(image != (
const Image *) NULL);
3180 height=(size_t) (y_resolution*image->
rows/(image->
resolution.
y == 0.0 ?
3182 resample_image=
ResizeImage(image,width,height,filter,exception);
3183 if (resample_image != (
Image *) NULL)
3188 return(resample_image);
3251 return(contribution);
3267 sizeof(*contribution));
3270 (void) memset(contribution,0,number_threads*
sizeof(*contribution));
3271 for (i=0; i < (ssize_t) number_threads; i++)
3278 return(contribution);
3287 #define ResizeImageTag "Resize/Image" 3314 storage_class=support > 0.5 ?
DirectClass : image->storage_class;
3322 support=(double) 0.5;
3336 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3337 #pragma omp parallel for schedule(static) shared(progress,status) \ 3338 magick_number_threads(image,resize_image,resize_image->columns,1) 3340 for (x=0; x < (ssize_t) resize_image->columns; x++)
3369 start=(ssize_t)
MagickMax(bisect-support+0.5,0.0);
3370 stop=(ssize_t)
MagickMin(bisect+support+0.5,(
double) image->columns);
3372 contribution=contributions[id];
3373 for (n=0; n < (stop-start); n++)
3375 contribution[n].pixel=start+n;
3377 ((
double) (start+n)-bisect+0.5));
3378 density+=contribution[n].weight;
3382 if ((density != 0.0) && (density != 1.0))
3391 for (i=0; i < n; i++)
3392 contribution[i].weight*=density;
3395 (contribution[n-1].pixel-contribution[0].pixel+1),image->rows,exception);
3403 for (y=0; y < (ssize_t) resize_image->rows; y++)
3439 k=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
3440 (contribution[j-start].pixel-contribution[0].pixel);
3451 for (j=0; j < n; j++)
3453 k=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
3454 (contribution[j].pixel-contribution[0].pixel);
3455 alpha=contribution[j].weight;
3465 for (j=0; j < n; j++)
3467 k=y*(contribution[n-1].pixel-contribution[0].pixel+1)+
3468 (contribution[j].pixel-contribution[0].pixel);
3486 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3532 storage_class=support > 0.5 ?
DirectClass : image->storage_class;
3540 support=(double) 0.5;
3554 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3555 #pragma omp parallel for schedule(static) shared(progress,status) \ 3556 magick_number_threads(image,resize_image,resize_image->rows,1) 3558 for (y=0; y < (ssize_t) resize_image->rows; y++)
3587 start=(ssize_t)
MagickMax(bisect-support+0.5,0.0);
3588 stop=(ssize_t)
MagickMin(bisect+support+0.5,(
double) image->rows);
3590 contribution=contributions[id];
3591 for (n=0; n < (stop-start); n++)
3593 contribution[n].pixel=start+n;
3595 ((
double) (start+n)-bisect+0.5));
3596 density+=contribution[n].weight;
3600 if ((density != 0.0) && (density != 1.0))
3609 for (i=0; i < n; i++)
3610 contribution[i].weight*=density;
3613 image->columns,(
size_t) (contribution[n-1].pixel-contribution[0].pixel+1),
3622 for (x=0; x < (ssize_t) resize_image->columns; x++)
3658 k=(ssize_t) ((contribution[j-start].pixel-contribution[0].pixel)*
3670 for (j=0; j < n; j++)
3672 k=(ssize_t) ((contribution[j].pixel-contribution[0].pixel)*
3674 alpha=contribution[j].weight;
3681 for (j=0; j < n; j++)
3683 k=(ssize_t) ((contribution[j].pixel-contribution[0].pixel)*
3702 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3746 assert(image != (
Image *) NULL);
3752 if ((columns == 0) || (rows == 0))
3754 if ((columns == image->
columns) && (rows == image->
rows) &&
3760 x_factor=(double) columns/(
double) image->
columns;
3761 y_factor=(double) rows/(
double) image->
rows;
3766 if ((x_factor == 1.0) && (y_factor == 1.0))
3771 ((x_factor*y_factor) > 1.0))
3774 #if defined(MAGICKCORE_OPENCL_SUPPORT) 3775 resize_image=AccelerateResizeImage(image,columns,rows,resize_filter,
3777 if (resize_image != (
Image *) NULL)
3780 return(resize_image);
3784 if (resize_image == (
Image *) NULL)
3787 return(resize_image);
3789 if (x_factor > y_factor)
3793 if (filter_image == (
Image *) NULL)
3802 if (x_factor > y_factor)
3807 status&=
VerticalFilter(resize_filter,filter_image,resize_image,y_factor,
3808 span,&offset,exception);
3813 status=
VerticalFilter(resize_filter,image,filter_image,y_factor,span,
3816 span,&offset,exception);
3826 return((
Image *) NULL);
3829 return(resize_image);
3866 #define SampleImageTag "Sample/Image" 3894 assert(image != (
const Image *) NULL);
3900 if ((columns == 0) || (rows == 0))
3902 if ((columns == image->
columns) && (rows == image->
rows))
3905 if (sample_image == (
Image *) NULL)
3906 return((
Image *) NULL);
3916 if (value != (
char *) NULL)
3936 if (x_offset == (ssize_t *) NULL)
3941 for (x1=0; x1 < (ssize_t) sample_image->
columns; x1++)
3942 x_offset[x1]=(ssize_t) ((((
double) x1+sample_offset.
x)*image->
columns)/
3951 #if defined(MAGICKCORE_OPENMP_SUPPORT) 3952 #pragma omp parallel for schedule(static) shared(status) \ 3953 magick_number_threads(image,sample_image,sample_image->rows,1) 3955 for (y=0; y < (ssize_t) sample_image->
rows; y++)
3971 y_offset=(ssize_t) ((((
double) y+sample_offset.
y)*image->
rows)/
3972 sample_image->
rows);
3985 for (x=0; x < (ssize_t) sample_image->
columns; x++)
4033 return(sample_image);
4068 #define ScaleImageTag "Scale/Image" 4109 assert(image != (
const Image *) NULL);
4115 if ((columns == 0) || (rows == 0))
4117 if ((columns == image->
columns) && (rows == image->
rows))
4120 if (scale_image == (
Image *) NULL)
4121 return((
Image *) NULL);
4125 return((
Image *) NULL);
4133 if (image->
rows != scale_image->
rows)
4140 if ((scanline == (
double *) NULL) || (scale_scanline == (
double *) NULL) ||
4141 (x_vector == (
double *) NULL) || (y_vector == (
double *) NULL))
4143 if ((image->
rows != scale_image->
rows) && (scanline != (
double *) NULL))
4145 if (scale_scanline != (
double *) NULL)
4147 if (x_vector != (
double *) NULL)
4149 if (y_vector != (
double *) NULL)
4160 scale.
y=(double) scale_image->
rows/(
double) image->
rows;
4167 for (y=0; y < (ssize_t) scale_image->
rows; y++)
4188 if (scale_image->
rows == image->
rows)
4195 if (p == (
const Quantum *) NULL)
4200 for (x=0; x < (ssize_t) image->
columns; x++)
4228 while (scale.
y < span.
y)
4231 (number_rows < (ssize_t) image->
rows))
4238 if (p == (
const Quantum *) NULL)
4243 for (x=0; x < (ssize_t) image->
columns; x++)
4267 for (x=0; x < (ssize_t) image->
columns; x++)
4272 scale.
y=(double) scale_image->
rows/(
double) image->
rows;
4275 if ((next_row !=
MagickFalse) && (number_rows < (ssize_t) image->
rows))
4282 if (p == (
const Quantum *) NULL)
4287 for (x=0; x < (ssize_t) image->
columns; x++)
4312 for (x=0; x < (ssize_t) image->
columns; x++)
4325 scale.
y=(double) scale_image->
rows/(
double) image->
rows;
4335 for (x=0; x < (ssize_t) scale_image->
columns; x++)
4381 for (x=0; x < (ssize_t) image->
columns; x++)
4384 while (scale.
x >= span.
x)
4430 for (x=0; x < (ssize_t) scale_image->
columns; x++)
4483 if (scale_image->
rows != image->
rows)
4489 return(scale_image);
4526 #define SampleFactor 5 4541 assert(image != (
Image *) NULL);
4548 if (thumbnail_image == (
Image *) NULL)
4549 return(thumbnail_image);
4550 if ((columns != image->
columns) || (rows != image->
rows))
4553 *clone_image = thumbnail_image;
4559 x_factor=(ssize_t) image->
columns/columns;
4560 y_factor=(ssize_t) image->
rows/rows;
4561 if ((x_factor > 4) && (y_factor > 4))
4563 thumbnail_image=
SampleImage(clone_image,4*columns,4*rows,exception);
4564 if (thumbnail_image != (
Image *) NULL)
4567 clone_image=thumbnail_image;
4570 if ((x_factor > 2) && (y_factor > 2))
4574 if (thumbnail_image != (
Image *) NULL)
4577 clone_image=thumbnail_image;
4583 if (thumbnail_image == (
Image *) NULL)
4584 return(thumbnail_image);
4587 thumbnail_image->
depth=8;
4612 attributes.st_mtime);
4614 attributes.st_mtime);
4620 (void)
SetImageProperty(thumbnail_image,
"Thumb::Mimetype",value,exception);
4629 return(thumbnail_image);
MagickExport Image * ResizeImage(const Image *image, const size_t columns, const size_t rows, const FilterType filter, ExceptionInfo *exception)
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
MagickExport ssize_t FormatMagickSize(const MagickSizeType size, const MagickBooleanType bi, const char *suffix, const size_t length, char *format)
static ssize_t GetPixelChannelOffset(const Image *magick_restrict image, const PixelChannel channel)
MagickExport MemoryInfo * RelinquishVirtualMemory(MemoryInfo *memory_info)
MagickExport MagickBooleanType GetPathAttributes(const char *path, void *attributes)
MagickProgressMonitor progress_monitor
static MagickBooleanType HorizontalFilter(const ResizeFilter *magick_restrict resize_filter, const Image *magick_restrict image, Image *magick_restrict resize_image, const double x_factor, const MagickSizeType span, MagickOffsetType *magick_restrict progress, ExceptionInfo *exception)
static Quantum GetPixelAlpha(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
double(*)(*) window_support
#define MagickAssumeAligned(address)
double(*)(*) coefficient[7]
static double Jinc(const double x, const ResizeFilter *magick_unused(resize_filter))
MagickExport ssize_t ParseCommandOption(const CommandOption option, const MagickBooleanType list, const char *options)
static double I0(double x)
static void Mix2Pixels(const Quantum *source, const ssize_t source_offset1, const ssize_t source_offset2, Quantum *destination, const ssize_t destination_offset, const size_t channels)
static void Epbx2X(const Image *magick_unused(source), const Quantum *pixels, Quantum *result, const size_t channels)
MagickExport MagickBooleanType DeleteImageProfile(Image *image, const char *name)
static double Hann(const double x, const ResizeFilter *magick_unused(resize_filter))
MagickExport MemoryInfo * AcquireVirtualMemory(const size_t count, const size_t quantum)
MagickExport MagickStatusType ParseAbsoluteGeometry(const char *geometry, RectangleInfo *region_info)
MagickExport MagickBooleanType DeleteImageArtifact(Image *image, const char *artifact)
#define MagickAuthoritativeURL
static double Blackman(const double x, const ResizeFilter *magick_unused(resize_filter))
static double Q1(double x)
#define caseA(N, A, B, C, D)
MagickExport MagickBooleanType InterpolatePixelChannels(const Image *magick_restrict source, const CacheView_ *source_view, const Image *magick_restrict destination, const PixelInterpolateMethod method, const double x, const double y, Quantum *pixel, ExceptionInfo *exception)
MagickExport const char * GetImageArtifact(const Image *image, const char *artifact)
static void MixPixels(const Quantum *source, const ssize_t *source_offset, const size_t source_size, Quantum *destination, const ssize_t destination_offset, const size_t channels)
static PixelTrait GetPixelChannelTraits(const Image *magick_restrict image, const PixelChannel channel)
MagickExport Image * LiquidRescaleImage(const Image *image, const size_t magick_unused(columns), const size_t magick_unused(rows), const double magick_unused(delta_x), const double magick_unused(rigidity), ExceptionInfo *exception)
MagickExport Image * SampleImage(const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
ResizeWeightingFunctionType windowWeightingType
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
MagickPrivate double GetResizeFilterScale(const ResizeFilter *resize_filter)
char magick[MagickPathExtent]
#define DefaultResolution
MagickPrivate double GetResizeFilterWindowSupport(const ResizeFilter *resize_filter)
MagickExport const Quantum * GetCacheViewVirtualPixels(const CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static long StringToLong(const char *magick_restrict value)
MagickExport const char * GetImageOption(const ImageInfo *image_info, const char *option)
static ContributionInfo ** DestroyContributionTLS(ContributionInfo **contribution)
static double SincFast(const double, const ResizeFilter *)
MagickExport Image * ThumbnailImage(const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
static Quantum ClampToQuantum(const MagickRealType quantum)
static MagickBooleanType VerticalFilter(const ResizeFilter *magick_restrict resize_filter, const Image *magick_restrict image, Image *magick_restrict resize_image, const double y_factor, const MagickSizeType span, MagickOffsetType *magick_restrict progress, ExceptionInfo *exception)
#define MagickCoreSignature
static void Hq2XHelper(const unsigned int rule, const Quantum *source, Quantum *destination, const ssize_t destination_offset, const size_t channels, const ssize_t e, const ssize_t a, const ssize_t b, const ssize_t d, const ssize_t f, const ssize_t h)
static double Lagrange(const double x, const ResizeFilter *resize_filter)
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
unsigned int MagickStatusType
static double PerceptibleReciprocal(const double x)
MagickPrivate double GetResizeFilterSupport(const ResizeFilter *resize_filter)
MagickExport void LocaleLower(char *string)
static double BesselOrderOne(double)
MagickExport const char * CommandOptionToMnemonic(const CommandOption option, const ssize_t type)
static double Cosine(const double x, const ResizeFilter *magick_unused(resize_filter))
struct _ImageInfo * image_info
MagickExport void * AcquireCriticalMemory(const size_t size)
static Quantum GetPixelWriteMask(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport Image * MinifyImage(const Image *image, ExceptionInfo *exception)
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
static double P1(double x)
static int GetOpenMPThreadId(void)
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property, const char *value, ExceptionInfo *exception)
MagickPrivate ResizeWeightingFunctionType GetResizeFilterWeightingType(const ResizeFilter *resize_filter)
MagickPrivate double * GetResizeFilterCoefficient(const ResizeFilter *resize_filter)
static unsigned int Hq2XPatternToNumber(const int *pattern)
MagickExport void * RelinquishAlignedMemory(void *memory)
MagickExport MagickBooleanType IsStringTrue(const char *value)
MagickExport MagickBooleanType IsEventLogging(void)
MagickExport int GetMagickPrecision(void)
MagickExport Quantum * QueueCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static void Eagle3XB(const Image *magick_unused(source), const Quantum *pixels, Quantum *result, const size_t channels)
char magick_filename[MagickPathExtent]
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
static double Triangle(const double x, const ResizeFilter *magick_unused(resize_filter))
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
#define Corner(A, B, C, D)
MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type)
struct _ContributionInfo ContributionInfo
MagickBooleanType(* MagickProgressMonitor)(const char *, const MagickOffsetType, const MagickSizeType, void *)
static double Quadratic(const double x, const ResizeFilter *magick_unused(resize_filter))
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class, ExceptionInfo *exception)
MagickExport Image * ResampleImage(const Image *image, const double x_resolution, const double y_resolution, const FilterType filter, ExceptionInfo *exception)
MagickExport void * AcquireAlignedMemory(const size_t count, const size_t quantum)
MagickExport MagickBooleanType CopyImagePixels(Image *image, const Image *source_image, const RectangleInfo *geometry, const OffsetInfo *offset, ExceptionInfo *exception)
MagickPrivate ResizeWeightingFunctionType GetResizeFilterWindowWeightingType(const ResizeFilter *resize_filter)
MagickExport char * GetNextImageProfile(const Image *image)
static void CopyPixels(const Quantum *source, const ssize_t source_offset, Quantum *destination, const ssize_t destination_offset, const size_t channels)
static void Scale2X(const Image *magick_unused(source), const Quantum *pixels, Quantum *result, const size_t channels)
static size_t GetPixelChannels(const Image *magick_restrict image)
MagickExport int LocaleCompare(const char *p, const char *q)
MagickPrivate ResizeFilter * DestroyResizeFilter(ResizeFilter *resize_filter)
char filename[MagickPathExtent]
#define GetMagickModule()
#define ThrowImageException(severity, tag)
static PixelChannel GetPixelChannelChannel(const Image *magick_restrict image, const ssize_t offset)
MagickExport CacheView * AcquireVirtualCacheView(const Image *image, ExceptionInfo *exception)
#define caseB(N, A, B, C, D, E, F, G, H)
static void Scale3X(const Image *magick_unused(source), const Quantum *pixels, Quantum *result, const size_t channels)
static double Welch(const double x, const ResizeFilter *magick_unused(resize_filter))
MagickExport MagickSizeType GetBlobSize(const Image *image)
MagickExport Image * MagnifyImage(const Image *image, ExceptionInfo *exception)
static void Xbr2X(const Image *magick_unused(source), const Quantum *pixels, Quantum *result, const size_t channels)
MagickExport Image * AdaptiveResizeImage(const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
static double Sinc(const double, const ResizeFilter *)
static void Fish2X(const Image *source, const Quantum *pixels, Quantum *result, const size_t channels)
static double CubicBC(const double x, const ResizeFilter *resize_filter)
MagickExport MagickBooleanType DeleteImageProperty(Image *image, const char *property)
MagickPrivate double GetResizeFilterBlur(const ResizeFilter *resize_filter)
MagickPrivate double GetResizeFilterWeight(const ResizeFilter *resize_filter, const double x)
ResizeWeightingFunctionType
#define InterpolativeResizeImageTag
double(* filter)(const double, const ResizeFilter *)
MagickExport MagickStatusType ParseGeometry(const char *geometry, GeometryInfo *geometry_info)
static void SetPixelChannel(const Image *magick_restrict image, const PixelChannel channel, const Quantum quantum, Quantum *magick_restrict pixel)
static void Eagle2X(const Image *source, const Quantum *pixels, Quantum *result, const size_t channels)
MagickPrivate ResizeFilter * AcquireResizeFilter(const Image *image, const FilterType filter, const MagickBooleanType cylindrical, ExceptionInfo *exception)
static double Hamming(const double x, const ResizeFilter *magick_unused(resize_filter))
static double StringToDouble(const char *magick_restrict string, char *magick_restrict *sentinal)
static double Bohman(const double x, const ResizeFilter *magick_unused(resize_filter))
MagickExport void * RelinquishMagickMemory(void *memory)
#define magick_unreferenced(x)
static int PixelsEqual(const Quantum *source1, ssize_t offset1, const Quantum *source2, ssize_t offset2, const size_t channels)
ResizeWeightingFunctionType filterWeightingType
MagickExport void ResetImageProfileIterator(const Image *image)
static void Hq2X(const Image *source, const Quantum *pixels, Quantum *result, const size_t channels)
MagickExport Image * ScaleImage(const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
MagickExport MagickBooleanType FormatImageProperty(Image *image, const char *property, const char *format,...)
static double Gaussian(const double x, const ResizeFilter *resize_filter)
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
static ContributionInfo ** AcquireContributionTLS(const size_t count)
static void Eagle3X(const Image *magick_unused(source), const Quantum *pixels, Quantum *result, const size_t channels)
MagickExport Image * InterpolativeResizeImage(const Image *image, const size_t columns, const size_t rows, const PixelInterpolateMethod method, ExceptionInfo *exception)
MagickExport void * GetVirtualMemoryBlob(const MemoryInfo *memory_info)
#define HelperCond(a, b, c, d, e, f, g)
MagickExport MagickRealType GetPixelIntensity(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport size_t GetImageListLength(const Image *images)
static double Kaiser(const double x, const ResizeFilter *resize_filter)
double(*)(*) window(const double, const ResizeFilter *)
MagickExport Image * DestroyImage(Image *image)
MagickExport Image * CloneImage(const Image *image, const size_t columns, const size_t rows, const MagickBooleanType detach, ExceptionInfo *exception)
static double Box(const double magick_unused(x), const ResizeFilter *magick_unused(resize_filter))
MagickExport MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
static double J1(double x)
static double CubicSpline(const double x, const ResizeFilter *resize_filter)