ImageMagick-6.9.7-10差分

ImageMagick-7.0.5-0差分 - yoya's diaryの続き

The latest release of ImageMagick is version 6.9.7-10

まとめ

差分

1226a1227
>   option=GetImageOption(image_info,"jpeg:colors");
1229c1230,1233
<       ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
---
>       {
>         InheritException(exception,&image->exception);
>         return(DestroyImageList(image));
>       }
1237c1241,1244
<         ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
---
>         {
>           InheritException(exception,&image->exception);
>           return(DestroyImageList(image));
>         }
      • coders/miff.c
1162c1162,1165
<           ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
---
>           {
>             InheritException(exception,&image->exception);
>             return(DestroyImageList(image));
>           }
      • coders/pnm.c
600,601d599
<           if (status == MagickFalse)
<             continue;
605c603
<             status=MagickFalse;
---
>             break;
615c613
<                 status=MagickFalse;
---
>                 break;
620,623c618
<             {
<               status=MagickFalse;
<               continue;
<             }
<大量の差分>
1332,1334c1332,1338
<     if (fabs(distortion[RedChannel]) >= MagickEpsilon)
<       distortion[RedChannel]=20.0*MagickLog10((double) 1.0/sqrt(
<         distortion[RedChannel]));
---
>     {
>       if (fabs(distortion[RedChannel]) < MagickEpsilon)
>         distortion[RedChannel]=INFINITY;
>       else
>         distortion[RedChannel]=20.0*MagickLog10(1.0/
>           sqrt(distortion[RedChannel]));
>     }
1336,1338c1340,1346
<     if (fabs(distortion[GreenChannel]) >= MagickEpsilon)
<       distortion[GreenChannel]=20.0*MagickLog10((double) 1.0/sqrt(
<         distortion[GreenChannel]));
---
>     {
>       if (fabs(distortion[GreenChannel]) < MagickEpsilon)
>         distortion[GreenChannel]=INFINITY;
>       else
>         distortion[GreenChannel]=20.0*MagickLog10(1.0/
>           sqrt(distortion[GreenChannel]));
>     }
1340,1352c1348,1370
<     if (fabs(distortion[BlueChannel]) >= MagickEpsilon)
<       distortion[BlueChannel]=20.0*MagickLog10((double) 1.0/sqrt(
<         distortion[BlueChannel]));
<   if (((channel & OpacityChannel) != 0) &&
<       (image->matte != MagickFalse))
<     if (fabs(distortion[OpacityChannel]) >= MagickEpsilon)
<       distortion[OpacityChannel]=20.0*MagickLog10((double) 1.0/sqrt(
<         distortion[OpacityChannel]));
<   if (((channel & IndexChannel) != 0) &&
<       (image->colorspace == CMYKColorspace))
<     if (fabs(distortion[BlackChannel]) >= MagickEpsilon)
<       distortion[BlackChannel]=20.0*MagickLog10((double) 1.0/sqrt(
<         distortion[BlackChannel]));
---
>     {
>       if (fabs(distortion[BlueChannel]) < MagickEpsilon)
>         distortion[BlueChannel]=INFINITY;
>       else
>         distortion[BlueChannel]=20.0*MagickLog10(1.0/
>           sqrt(distortion[BlueChannel]));
>     }
>   if (((channel & OpacityChannel) != 0) && (image->matte != MagickFalse))
>     {
>       if (fabs(distortion[OpacityChannel]) < MagickEpsilon)
>         distortion[OpacityChannel]=INFINITY;
>       else
>         distortion[OpacityChannel]=20.0*MagickLog10(1.0/
>           sqrt(distortion[OpacityChannel]));
>     }
>   if (((channel & IndexChannel) != 0) && (image->colorspace == CMYKColorspace))
>     {
>       if (fabs(distortion[BlackChannel]) < MagickEpsilon)
>         distortion[BlackChannel]=INFINITY;
>       else
>         distortion[BlackChannel]=20.0*MagickLog10(1.0/
>           sqrt(distortion[BlackChannel]));
>     }
1354,1355c1372,1378
<     distortion[CompositeChannels]=20.0*MagickLog10((double) 1.0/sqrt(
<       distortion[CompositeChannels]));
---
>     {
>       if (fabs(distortion[CompositeChannels]) < MagickEpsilon)
>         distortion[CompositeChannels]=INFINITY;
>       else
>         distortion[CompositeChannels]=20.0*MagickLog10(1.0/
>           sqrt(distortion[CompositeChannels]));
>     }

ChangeLogにない差分

  • magick/accelerate.c
    • ComputeLocalContrastImage の計算間違い? kernel launch のループ数。
3049c3049
<       passes = (((1.0f * imageColumns) * imageColumns * iRadius) + 3999999999) / 4000000000.0f;
---
>       passes = (((1.0f * imageRows) * imageColumns * iRadius) + 3999999999) / 4000000000.0f;
  • magick/cache.c
196a197,199
>   PixelPacket
>     *pixels;
>

208a213,215
>   MagickBooleanType
>     events_completed;
>
211a219,221
>   ssize_t
>     i;
>
216c226,243
<   if (cache_info->opencl->event_count == 0)
---
>   events_completed=MagickTrue;
>   for (i=0; i < (ssize_t)cache_info->opencl->event_count; i++)
>   {
>     cl_int
>       event_status;
>
>     cl_uint
>       status;
>
>     status=clEnv->library->clGetEventInfo(cache_info->opencl->events[i],
>       CL_EVENT_COMMAND_EXECUTION_STATUS,sizeof(cl_int),&event_status,NULL);
>     if ((status == CL_SUCCESS) && (event_status != CL_COMPLETE))
>       {
>         events_completed=MagickFalse;
>         break;
>       }
>   }
>   if (events_completed != MagickFalse)
  • magick/enhance.c
    • hue の計算式が単純化されてる
3477,3481c3477
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue > 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3500,3504c3496
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue > 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3511,3512c3503,3504
<   const double percent_saturation,const double percent_brightness,
<   Quantum *red,Quantum *green,Quantum *blue)
---
>   const double percent_saturation,const double percent_brightness,Quantum *red,
>   Quantum *green,Quantum *blue)
3523,3527c3515
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue > 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3534,3535c3522,3523
<   const double percent_saturation,const double percent_intensity,
<   Quantum *red,Quantum *green,Quantum *blue)
---
>   const double percent_saturation,const double percent_intensity,Quantum *red,
>   Quantum *green,Quantum *blue)
3546,3550c3534
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue > 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3557,3558c3541,3542
<   const double percent_saturation,const double percent_lightness,
<   Quantum *red,Quantum *green,Quantum *blue)
---
>   const double percent_saturation,const double percent_lightness,Quantum *red,
>   Quantum *green,Quantum *blue)
3569,3573c3553
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue >= 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3592,3596c3572
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue >= 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3615,3619c3591
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue >= 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3640,3644c3612
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue >= 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
3663,3667c3631
<   hue+=0.5*(0.01*percent_hue-1.0);
<   while (hue < 0.0)
<     hue+=1.0;
<   while (hue >= 1.0)
<     hue-=1.0;
---
>   hue+=fmod((percent_hue-100.0),200.0)/200.0;
  • magick/image-private.h
    • INFINITY の定義を追加
32a33,35
> #if !defined(INFINITY)
> #  define INFINITY (log(0))
> #endif
  • magick/opencl-private.h
    • CL_API_ENTRY 定義
216a217,221
> typedef CL_API_ENTRY cl_int
>   (CL_API_CALL *MAGICKpfn_clGetEventInfo)(cl_event event,
>     cl_profiling_info param_name,size_t param_value_size,void *param_value,
>     size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
>
280a286
>   MAGICKpfn_clGetEventInfo            clGetEventInfo;
432a433
>   BIND(clGetEventInfo);
  • magick/option.c
    • resource オプションに throttle 追加。
1592a1593
>     { "Throttle", ThrottleResource, UndefinedOptionFlag, MagickFalse },
  • magick/statistic.c
    • GetImageChannelMoments の Compute elliptical angle, major and minor axes, eccentricity, & intensity の処理
1940a1941,1971
>     if (fabs(M11[channel]) < MagickEpsilon)
>       {
>         if (fabs(M20[channel]-M02[channel]) < MagickEpsilon)
>           channel_moments[channel].ellipse_angle+=0.0;
>         else
>           if ((M20[channel]-M02[channel]) < 0.0)
>             channel_moments[channel].ellipse_angle+=90.0;
>           else
>             channel_moments[channel].ellipse_angle+=0.0;
>       }
>     else
>       if (M11[channel] < 0.0)
>         {
>           if (fabs(M20[channel]-M02[channel]) < MagickEpsilon)
>             channel_moments[channel].ellipse_angle+=0.0;
>           else
>             if ((M20[channel]-M02[channel]) < 0.0)
>               channel_moments[channel].ellipse_angle+=90.0;
>             else
>               channel_moments[channel].ellipse_angle+=180.0;
>         }
>       else
>         {
>           if (fabs(M20[channel]-M02[channel]) < MagickEpsilon)
>             channel_moments[channel].ellipse_angle+=0.0;
>           else
>             if ((M20[channel]-M02[channel]) < 0.0)
>               channel_moments[channel].ellipse_angle+=90.0;
>             else
>               channel_moments[channel].ellipse_angle+=0.0;
>        }

ChangeLog

2017-03-03  6.9.7-10 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.7-10, GIT revision 11396:44b1bc6:20170303.

2017-02-21  6.9.7-10 Cristy  <quetzlzacatenango@image...>
  * Fix Spurious memory allocation message (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31438).
  * Identical images should return inf for PSNR (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31487).