ImageMagick-7.0.8-33差分

ImageMagick-7.0.8-33差分

http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 7.0.8-33

6 系同時リリースは ImageMagick-6.9.10-33

まとめ

  • JPEG の DCT メソッドデフォルトが以前はQuality:1〜90 の時(つまり殆どの場合) IFACT だったのが、元々の ISLOW に戻った。
気になる事
  • JPEG で DCT メソッド未指定で普通に使う(q:1〜90)とき以前は IDCT だったのをやめた。JDCT_ISLOW のまま。
  • draw.c で NegateImage を呼ぶのをやめてる箇所

差分

  • リサイズした後、primitive drawing structure を初期化。
    • MagickCore/draw.c
2262a2263,2264
>           for (i=mvg_info->offset+1; i < (ssize_t) extent; i++)
>             (*mvg_info->primitive_info)[i].primitive=UndefinedPrimitive;

ChangeLog にない差分

  • MagickCore/draw.c
    • NegateImage を単純にやめてる?????
1597,1599d1596
<       status=NegateImage(clip_mask,MagickFalse,exception);
<       if (status == MagickFalse)
<         clip_mask=DestroyImage(clip_mask);
2261a2259,2261
>           register ssize_t
>             i;
    • MVGMacroCompare の追加
2280a2283,2293
> MagickExport int MVGMacroCompare(const void *target,const void *source)
> {
>   const char
>     *p,
>     *q;
>
>   p=(const char *) target;
>   q=(const char *) source;
>   return(strcmp(p,q));
> }
>
2301c2314
<   macros=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory,
---
>   macros=NewSplayTree(MVGMacroCompare,RelinquishMagickMemory,
2493c2506
<         return(status);
---
>         return(MagickFalse);
  • coders/dpx.c
    • dpx.file.creator に GetMagickHomeURL でなく MagickAuthoritativeURL を入れる。
1464,1466d1463
<   char
<     *url;
<
1598,1600c1595,1596
<   url=GetMagickHomeURL();
<   (void) strncpy(dpx.file.creator,url,sizeof(dpx.file.creator)-1);
<   url=DestroyString(url);
---
>   (void) strncpy(dpx.file.creator,MagickAuthoritativeURL,
>     sizeof(dpx.file.creator)-1);
  • coders/gif.c
    • 優先度に合わせてかっこを正しくつける。
1099c1099
<               if (((ssize_t) count+offset+MagickPathExtent) >= (ssize_t) extent)
---
>               if ((ssize_t) (count+offset+MagickPathExtent) >= (ssize_t) extent)
  • coders/heic.c
    • キャストを追加。かっこの見直し
272c272
<       exif_buffer=RelinquishMagickMemory(exif_buffer);
---
>       exif_buffer=(unsigned char *) RelinquishMagickMemory(exif_buffer);
592c592
<   (void) WriteBlob(image,size,data);
---
>   (void) WriteBlob(image,size,(const unsigned char *) data);
713c713
<               if (x+1 < (long) image->columns)
---
>               if ((x+1) < (ssize_t) image->columns)
  • coders/jpeg.c
    • DCTメソッド指定なしで quality が 1〜90 の時に IFAST にする処理を取りやめ。
1384,1386d1383
<   if ((dct_method == (const char *) NULL) && (image->quality > 0) &&
<       (image->quality <= 90))
<     jpeg_info.dct_method=JDCT_IFAST;
  • coders/mat.c
    • 終了条件のチェックを増やした (OSS-Fuzz の指摘で脆弱性対応。-34 の ChangeLog のやつ)
1311c1311,1312
<
---
>     if (i != (long) MATLAB_HDR.SizeY)
>       goto END_OF_READING;
1327a1329,1330
>           if (EOFBlob(image) != MagickFalse)
>             break;
1335a1339,1340
>           if (EOFBlob(image) != MagickFalse)
>             break;
  • coders/pdb.c
    • pdb_info.name 文字列最大長制限
75a76
> #include "MagickCore/utility.h"
741a743,745
>   char
>     filename[MagickPathExtent];
>
810,811c814,815
<   (void) CopyMagickString(pdb_info.name,image_info->filename,
<     sizeof(pdb_info.name));
---
>   GetPathComponent(image_info->filename,TailPath,filename);
>   (void) CopyMagickString(pdb_info.name,filename,sizeof(pdb_info.name));
  • coders/psd.c
    • マスク画像のリセット。
1385a1386
>           (void) ResetImagePixels(mask,exception);
  • coders/tiff.c
    • 未使用の変数をコードから削除
715d714
<     length,

ChangeLog

2019-03-08  7.0.8-33 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-33, GIT revision 15399:716ec522c:20190309

2019-03-06  7.0.8-33 Cristy  <quetzlzacatenango@image...>
  * Fix SVG conversion infinite loop (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35591).
  * Initialize primitive drawing structure after resizing.

ImageMagick-7.0.8-32差分

ImageMagick-7.0.8-32差分

http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 7.0.8-32

6 系同時リリースは ImageMagick-6.9.10-32

まとめ

  • LocaleLowerCase() で範囲外(アクセス)の修正 (脆弱性)
気になる事

(特に無し)

差分

1523a1524,1525
>   if (c == EOF)
>     return(c);
1526c1528
<     return(tolower_l(c,c_locale));
---
>     return(tolower_l((int) ((unsigned char) c),c_locale));
1528c1530
<   return(tolower(c));
---
>   return(tolower((int) ((unsigned char) c)));
1661a1664,1665
>   if (c == EOF)
>     return(c);
1664c1668
<     return(toupper_l(c,c_locale));
---
>     return(toupper_l((int) ((unsigned char) c),c_locale));
1666c1670
<   return(toupper(c));
---
>   return(toupper((int) ((unsigned char) c)));

第一引数の c を 0〜255 の範囲に閉じ込めてる。

ChangeLog にない差分

(なし)

ChangeLog

2019-03-05  7.0.8-32 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-32, GIT revision ...

2019-03-05  7.0.8-32 Cristy  <quetzlzacatenango@image...>
  * Fix out-of-boundary LocaleLowerCase() @
    https://github.com/ImageMagick/ImageMagick/issues/1495

ImageMagick-7.0.8-29差分

ImageMagick-7.0.8-29差分

http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 7.0.8-29

6 系同時リリースは ImageMagick-6.9.10-29

まとめ

  • OSS Fuzz の指摘対応とその他。
気になる事
  • -trim に -define trim:blend=(0〜100) を追加。 GetImageBoundingBox がだいぶ改造されてる。
  • -draw で dash(点線) の間隔に比べて描画線が短い時の処理が変更されてる。
  • cms の ContextID の使い方が怪しい。。
  • length を extent に変えてるけど、これ後悔しないかな。。 extent は意味がぶれるので。

差分

ChangeLog にない差分

  • MagickCore/attribute.c
91a92
> #include "MagickCore/string-private.h"
125,126c126,138
< MagickExport RectangleInfo GetImageBoundingBox(const Image *image,
<   ExceptionInfo *exception)
---
>
> typedef struct _EdgeInfo
> {
>   double
>     left,
>     right,
>     top,
>     bottom;
> } EdgeInfo;
>
> static double GetEdgeBlendFactor(const Image *image,const CacheView *image_view,
>   const GravityType gravity,const size_t width,const size_t height,
>   const ssize_t x_offset,const ssize_t y_offset,ExceptionInfo *exception)
129c141
(大量の差分)
  • MagickCore/draw.c
    • 点線のひとつひとつの長さに満たない線を処理する時の変更。
1810
     if (fabs(length) < MagickEpsilon)
       {
>       if (fabs(draw_info->dash_pattern[n]) >= MagickEpsilon)
>          n++;
         if (fabs(draw_info->dash_pattern[n]) < MagickEpsilon)
           n=0;
         length=scale*draw_info->dash_pattern[n];
       }
1842a1845
       if (fabs(draw_info->dash_pattern[n]) >= MagickEpsilon)
         n++;
  • MagickCore/magick-baseconfig.h
    • MAGICKCORE_FONTCONFIG_DELEGATE が undefined の時の対処。デフォルト 1 扱い。
84,86c84
< #ifndef MAGICKCORE_FONTCONFIG_DELEGATE
< #define MAGICKCORE_FONTCONFIG_DELEGATE 1
< #endif
  • MagickCore/profile.c
    • Context ID にスタック変数のポインタ渡してるように見えるけど、大丈夫だっけ。。?
433c433,434
<   const int intent,const cmsUInt32Number flags)
---
>   const int intent,const cmsUInt32Number flags,
>   CMSExceptionInfo *cms_exception)
452,453c453,454
<     transform[i]=cmsCreateTransformTHR((cmsContext) image,source_profile,
<       source_type,target_profile,target_type,intent,flags);
---
>     transform[i]=cmsCreateTransformTHR((cmsContext) cms_exception,
>       source_profile,source_type,target_profile,target_type,intent,flags);
1136c1137,1138
<               source_type,target_profile,target_type,intent,flags);
---
>               source_type,target_profile,target_type,intent,flags,
>             &cms_exception);
  • coders/jp2.c
    • デコードエリアの指定。変数名 length => extent 変更。
380a381,383
>         jp2_status=opj_set_decode_area(jp2_codec,jp2_image,0,0,
>           jp2_image->comps[0].w-1,jp2_image->comps[0].h-1);
>         if (jp2_status != 0)
diff -rwB ImageMagick-7.0.8-28/coders/miff.c ImageMagick-7.0.8-29/coders/miff.c
1143c1143
<         length=MagickPathExtent;
---
>         extent=MagickPathExtent;
1145a1146
>         length=0;
1149c1150
<           if ((strlen(image->directory)+MagickPathExtent) >= length)
---
>           if ((length+MagickPathExtent) >= extent)
1154c1155
<               length<<=1;
---
>               extent<<=1;
1156c1157
<                 length+MagickPathExtent,sizeof(*image->directory));
---
>                 extent+MagickPathExtent,sizeof(*image->directory));
1159c1160
<               p=image->directory+strlen(image->directory);
---
>               p=image->directory+length;
1164a1166
>           length++;
  • coders/mpc.c
    • 変数名変更 length=>extent
181a182
>     extent,
812c813
<         length=MagickPathExtent;
---
>         extent=MagickPathExtent;
814a816
>         length=0;
818c820
<           if ((strlen(image->directory)+MagickPathExtent) >= length)
---
>           if ((length+MagickPathExtent) >= extent)
823c825
<               length<<=1;
---
>               extent<<=1;
825c827
<                 length+MagickPathExtent,sizeof(*image->directory));
---
>                 extent+MagickPathExtent,sizeof(*image->directory));
833c835
<               p=image->directory+strlen(image->directory);
---
>               p=image->directory+length;
838a841
>           length++;
  • coders/pango.c
    • pango:align の実装
330a331,340
>   option=GetImageOption(image_info,"pango:align");
>   if (option != (const char *) NULL)
>     {
>       if (LocaleCompare(option,"center") == 0)
>         align=PANGO_ALIGN_CENTER;
>       if (LocaleCompare(option,"left") == 0)
>         align=PANGO_ALIGN_LEFT;
>       if (LocaleCompare(option,"right") == 0)
>         align=PANGO_ALIGN_RIGHT;
>     }
  • coders/pdf.c
    • CoderDecoderSeekableStreamFlag のフラグセット
921a922
>   entry->flags|=CoderDecoderSeekableStreamFlag;
929a931
>   entry->flags|=CoderDecoderSeekableStreamFlag;
937a940
>   entry->flags|=CoderDecoderSeekableStreamFlag;
  • coders/tiff.c
    • ファイルから tiff:tietz_offset の取り込み
718,720d717
<   unsigned long
<     *tietz;
<
795,800d791
<   if ((TIFFGetField(tiff,37706,&length,&tietz) == 1) &&
<       (tietz != (unsigned long *) NULL))
<     {
<       (void) FormatLocaleString(message,MagickPathExtent,"%lu",tietz[0]);
<       (void) SetImageProperty(image,"tiff:tietz_offset",message,exception);
<     }
  • coders/wpg.c
    • image->colors が小さい場合はカラーマップのコピーのサイズをそっちに合わせる
1265,1266c1265,1266
<                       (void) memcpy(image->colormap,colormap,colors*
<                         sizeof(*image->colormap));
---
>                       (void) memcpy(image->colormap,colormap,MagickMin(
>                         image->colors,colors)*sizeof(*image->colormap));

ChangeLog

2019-02-28  7.0.8-29 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-29, GIT revision 15368:5d8ed9f56:20190228

2019-02-28  7.0.8-29 Cristy  <quetzlzacatenango@image...>
  * Fixed a number of issues (reference
    https://github.com/ImageMagick/ImageMagick/issues).
  * Fixed numerous use of uninitialized values, integer overflow, memory
    exceeded, and timeouts (credit to OSS Fuzz).

(ImageMagick-7.0.8-30 の ChangeLog で追記)

ImageMagick-7.0.8-31差分

ImageMagick-7.0.8-31差分

http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 7.0.8-31

6 系同時リリースは ImageMagick-6.9.10-31

まとめ

  • -trim が画像の virtual canvas に過敏に反応しないようにした。
気になる事

差分

  • -trim が画像の virtual canvas に過敏に反応しないようにした。
    • MagickCore/attribute.c
      • 入力 image と別に作業用の edge_image を別に作って、そこで処理。
244c244
<     *image_view;
---
>     *edge_view;
256a257,259
>   Image
>     *edge_image;
>
267a271,274
>   edge_image=CloneImage(image,0,0,MagickTrue,exception);
>   if (edge_image == (Image *) NULL)
>     return(bounds);
>   (void) ParseAbsoluteGeometry("0x0+0+0",&edge_image->page);
269,277c276,284
<   image_view=AcquireVirtualCacheView(image,exception);
<   edge.left=GetEdgeBackgroundFactor(image,image_view,WestGravity,1,0,0,0,
<     exception);
<   edge.right=GetEdgeBackgroundFactor(image,image_view,EastGravity,1,0,0,0,
<     exception);
<   edge.top=GetEdgeBackgroundFactor(image,image_view,NorthGravity,0,1,0,0,
<     exception);
<   edge.bottom=GetEdgeBackgroundFactor(image,image_view,SouthGravity,0,1,0,0,
<     exception);
---
>   edge_view=AcquireVirtualCacheView(edge_image,exception);
>   edge.left=GetEdgeBackgroundFactor(edge_image,edge_view,WestGravity,
>     1,0,0,0,exception);
>   edge.right=GetEdgeBackgroundFactor(edge_image,edge_view,EastGravity,
>     1,0,0,0,exception);
>   edge.top=GetEdgeBackgroundFactor(edge_image,edge_view,NorthGravity,
>     0,1,0,0,exception);
>   edge.bottom=GetEdgeBackgroundFactor(edge_image,edge_view,SouthGravity,
>     0,1,0,0,exception);
279c286
<   artifact=GetImageArtifact(image,"trim:percent-background");
---
>   artifact=GetImageArtifact(edge_image,"trim:percent-background");
297,303c304,312
    (同様に image の代わりに edge_image で処理)
357c370,371
<   image_view=DestroyCacheView(image_view);
---
>   edge_view=DestroyCacheView(edge_view);
>   edge_image=DestroyImage(edge_image);
361d374
<     {
364,365d376
<       SetGeometry(image,&bounds);
<     }

ChangeLog にない差分

  • MagickCore/cache.c
    • 今までは黙って NULL 返すだけのとこにエラー表示を追加。
    • MagickResouce のリークしそうだけど大丈夫?
static inline MagickBooleanType AcquireCacheNexusPixels(
  const CacheInfo *magick_restrict cache_info,const MagickSizeType length,
  NexusInfo *nexus_info,ExceptionInfo *exception)
{
  if (length != (MagickSizeType) ((size_t) length))
    {
>      (void) ThrowMagickException(exception,GetMagickModule(),
>        ResourceLimitError,"PixelCacheAllocationFailed","`%s'",
>        cache_info->filename);
      return(MagickFalse);
    }
4990c4995
<         ResourceLimitError,"MemoryAllocationFailed","`%s'",
---
続きを読む

ImageMagick-7.0.8-30差分

ImageMagick-7.0.8-30差分

http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 7.0.8-30

6 系同時リリースは ImageMagick-6.9.10-30

まとめ

  • -define trim:percent-background=~ を追加 (7.0.8-29 で trim:blend として実装してたもの)
気になる事
  • -define trim:percent-background=0% を例にしてるが、内部で 100 で割ってるのでまずいような? 0だと結果変わらないし、単純に % が無視されるかもしれないが。strtod_l がどう動くのか。

差分

  • Support define to remove additional background from an image during a trim, e.g. -define trim:percent-background=0% -trim.
    • MagickCore/attribute.c
136,138c136,139
< static double GetEdgeBlendFactor(const Image *image,const CacheView *image_vie
w,
<   const GravityType gravity,const size_t width,const size_t height,
<   const ssize_t x_offset,const ssize_t y_offset,ExceptionInfo *exception)
---
> static double GetEdgeBackgroundFactor(const Image *image,
>   const CacheView *image_view,const GravityType gravity,const size_t width,
>   const size_t height,const ssize_t x_offset,const ssize_t y_offset,
>   ExceptionInfo *exception)
229c230
< static inline double GetMinBlendFactor(const EdgeInfo *edge)
---
> static inline double GetMinEdgeBackgroundFactor(const EdgeInfo *edge)
(沢山省略)
346,347c358,359
<   bounds.x=(ssize_t) count.left;
<   bounds.y=(ssize_t) count.top;
---
>   bounds.x=(ssize_t) vertex.left;
>   bounds.y=(ssize_t) vertex.top;
348a361,363
>     {
>       (void) ThrowMagickException(exception,GetMagickModule(),OptionWarning,
>         "GeometryDoesNotContainImage","`%s'",image->filename);
349a365
>     }

ChangeLog にない差分

(無し)

ChangeLog

> 2019-03-03  7.0.8-30 Cristy  <quetzlzacatenango@image...>
>   * Release ImageMagick version 7.0.8-30, GIT revision ...
>
> 2019-03-03  7.0.8-30 Cristy  <quetzlzacatenango@image...>
>   * Support define to remove additional background from an image during a
>     trim, e.g. -fuzz 5% -define trim:percent-background=0% -trim.

ImageMagick-6.9.10-28差分

ImageMagick-6.9.10-28差分

http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 6.9.10-28

7 系同時リリースは ImageMagick-7.0.8-28

まとめ

気になる事

差分

  • WebP で -define webp:use-sharp-yuv=1 指定ができるように。
    • 実験用PNG素材

f:id:yoya:20190218235913p:plain
convert -size 256x256 xc:white -stroke red -draw "line 128 0 128 256 line 0 128 256 128 " red-line.png

    • WebP への変換結果。左が今までの。右は -define webp:use-sharp-yuv=1 指定。

f:id:yoya:20190218235714p:plain
-define webp:use-sharp-yuv=1 の検証

    • WebPの弱点として有名な色のくすみが大分改善される。なお少しだけファイルサイズ増える。(libwebp 的には v6.0.0 からの機能なので実は数年前からあります)
  • もう少し詳細 >

qiita.com

ChangeLog にない差分

<    #'CC' => 'gcc',
>    #'CC' => 'gcc -std=gnu99 -std=gnu99',
<    'PERLMAINCC'       => ' ',
>    'PERLMAINCC'       => ' -fopenmp',
  • PerlMagick/t/input.fits
大量のバイナリ差分
  • coders/cin.c
726a727,728
>   if (((MagickSizeType) image->columns*image->rows/8) > GetBlobSize(image))
>     ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");

- 
>       {
>         image->colors++;
1292a1295
>       }
  • coders/heic.c
    • coder のバージョンを設定。
395a396,398
> #if defined(LIBHEIF_VERSION)
>   entry->version=ConstantString(LIBHEIF_VERSION);
> #endif
  • coders/miff.c
    • 明示的なキャストを追加
    • 画像のパラメータチェックをより厳密に
    • LZMAMaxExtent の利用。
228,229c228,230
<           *index=ConstrainColormapIndex(image,((size_t) *p << 24) |
<             ((size_t) *(p+1) << 16) | ((size_t) *(p+2) << 8) | (size_t) *(p+3));
---
>           *index=ConstrainColormapIndex(image,(ssize_t) (((size_t) *p << 24) |
>             ((size_t) *(p+1) << 16) | ((size_t) *(p+2) << 8) |
>             (size_t) *(p+3)));
235c236
<           *index=ConstrainColormapIndex(image,(*p << 8) | *(p+1));
---
>           *index=ConstrainColormapIndex(image,(ssize_t) ((*p << 8) | *(p+1)));
241c242
<           *index=ConstrainColormapIndex(image,*p);
---
>           *index=ConstrainColormapIndex(image,(ssize_t) *p);
1116c1117
<     if ((LocaleCompare(id,"ImageMagick") != 0) || (image->depth > 128) ||
---
>     if ((LocaleCompare(id,"ImageMagick") != 0) ||
1120c1121,1122
<         (image->columns == 0) || (image->rows == 0))
---
>         (image->columns == 0) || (image->rows == 0) ||
>         (image->depth == 0) || (image->depth > 64))
1332a1335,1336
>     if (compress_extent < (packet_size*image->columns))
>       ThrowMIFFException(ResourceLimitError,"MemoryAllocationFailed");
1598c1602
<           extent=x;
---
>           extent=(size_t) x;
2619c2623
<             lzma_info.avail_out=packet_size*image->columns;
---
>             lzma_info.avail_out=LZMAMaxExtent(packet_size*image->columns);
  • coders/mpc.c
    • 画像のパラメータチェックをより厳密に
768c768
<     if ((LocaleCompare(id,"MagickCache") != 0) || (image->depth > 128) ||
---
>     if ((LocaleCompare(id,"MagickCache") != 0) ||
770,771c770,772
<         (image->compression == UndefinedCompression) || (image->columns == 0) ||
<         (image->rows == 0))
---
>         (image->compression == UndefinedCompression) ||
>         (image->columns == 0) || (image->rows == 0) ||
>         (image->depth == 0) || (image->depth > 64))
  • coders/mvg.c
--  mvg:vector-graphics の処理を追加。
--  ExpandBuffer の引数を逆に。掛け算の順序が変わるだけで影響はない?
>|c|
244c244
<   (void) SetImageArtifact(image,"MVG",draw_info->primitive);
---
>   (void) SetImageArtifact(image,"mvg:vector-graphics",draw_info->primitive);
356c356
<   value=GetImageArtifact(image,"MVG");
---
>   value=GetImageArtifact(image,"mvg:vector-graphics");
  • coders/pict.c
    • const 修飾追加。
329,330c329,330
< static unsigned char *ExpandBuffer(unsigned char *pixels,
<   MagickSizeType *bytes_per_line,const unsigned int bits_per_pixel)
---
> static const unsigned char *ExpandBuffer(const unsigned char *magick_restrict pixels,
>   const unsigned int bits_per_pixel,MagickSizeType *bytes_per_line)
331a332,334
>   register const unsigned char
>     *p;
>
336d338
<     *p,
405a408,410
>   register const unsigned char
>     *p;
>
410d414
<     *p,
482c486
<         p=ExpandBuffer(scanline,&number_pixels,bits_per_pixel);
---
>         p=ExpandBuffer(scanline,bits_per_pixel,&number_pixels);
521c525
<           p=ExpandBuffer(scanline+j+1,&number_pixels,bits_per_pixel);
---
>           p=ExpandBuffer(scanline+j+1,bits_per_pixel,&number_pixels);
531c535
<           p=ExpandBuffer(scanline+j+1,&number_pixels,bits_per_pixel);
---
>           p=ExpandBuffer(scanline+j+1,bits_per_pixel,&number_pixels);
(略)
  • coders/svg.c
    • trim 後に length が 0 の時は失敗と同じ処理
    • mvg:vector-graphics 対応。
681c681,682
<   if (trim != MagickFalse)
---
>   length=strlen(message);
>   if ((trim != MagickFalse) && (length != 0))
686d686
<       length=strlen(message);
4139c4139
<   value=GetImageArtifact(image,"MVG");
---
>   value=GetImageArtifact(image,"mvg:vector-graphics");
-- 
>|c|
1923a1924
>         (void) SetImageStorageClass(image,DirectClass);
1954c1955,1957
<             if (image->matte != MagickFalse)
---
>             if (image->matte == MagickFalse)
>               SetPixelOpacity(q,OpaqueOpacity);
>             else
2057a2061
>                   SetPixelOpacity(q,OpaqueOpacity);
2095a2100
>         (void) SetImageStorageClass(image,DirectClass);
2127c2132,2134
<             if (image->matte != MagickFalse)
---
>             if (image->matte == MagickFalse)
>               SetPixelOpacity(q,OpaqueOpacity);
>             else
  • coders/webp.c
    • バージョンによる機能切り替えの修正。
484,486c484,486
<     (WebPGetDecoderVersion() >> 16) & 0xff,
<     (WebPGetDecoderVersion() >> 8) & 0xff,
<     (WebPGetDecoderVersion() >> 0) & 0xff,WEBP_DECODER_ABI_VERSION);
---
>     (WebPGetEncoderVersion() >> 16) & 0xff,
>     (WebPGetEncoderVersion() >> 8) & 0xff,
>     (WebPGetEncoderVersion() >> 0) & 0xff,WEBP_ENCODER_ABI_VERSION);
552c552
< #if WEBP_DECODER_ABI_VERSION >= 0x0100
---
> #if WEBP_ENCODER_ABI_VERSION >= 0x0100
640c640
< #if WEBP_DECODER_ABI_VERSION >= 0x0100
---
> #if WEBP_ENCODER_ABI_VERSION >= 0x0100
669c669
< #if WEBP_DECODER_ABI_VERSION >= 0x0200
---
> #if WEBP_ENCODER_ABI_VERSION >= 0x0200
723c723
< #if WEBP_DECODER_ABI_VERSION >= 0x0201
---
> #if WEBP_ENCODER_ABI_VERSION >= 0x0201
736c736
< #if WEBP_DECODER_ABI_VERSION >= 0x020e
---
> #if WEBP_ENCODER_ABI_VERSION >= 0x020e
834c834
< #if WEBP_DECODER_ABI_VERSION >= 0x0100
---
> #if WEBP_ENCODER_ABI_VERSION >= 0x0100
  • coders/wpg.c
    • カラーマップのサイズ変更の処理をエラー対処つきで。
1113a1114
>   image->storage_class=DirectClass;
1172c1173
<               if (!AcquireImageColormap(image,image->colors))
---
>               if (AcquireImageColormap(image,image->colors) == MagickFalse)
1259,1260c1260,1276
<                       image->colormap=(PixelPacket *) ResizeQuantumMemory(
<                         image->colormap,(size_t) (one << bpp),
---
>                     {
>                       PixelPacket
>                         *colormap;
>
>                       size_t
>                         colors;
>
>                       colormap=image->colormap;
>                       colors=image->colors;
>                       image->colormap=(PixelPacket *) NULL;
>                       if (AcquireImageColormap(image,one << bpp) == MagickFalse)
>                         {
>                           colormap=(PixelPacket *)
>                             RelinquishMagickMemory(colormap);
>                           goto NoMemory;
>                         }
>                       (void) memcpy(image->colormap,colormap,colors*
1261a1278,1280
>                       colormap=(PixelPacket *)
>                         RelinquishMagickMemory(colormap);
>                     }
  • magick/annotate.c
    • リファイン?
1530a1531
>     glyph.image=0;
1716c1717,1718
<     if (last_glyph.id != 0)
---
>     if (last_glyph.image != 0)
>       {
1717a1720,1721
>         last_glyph.image=0;
>       }
1725,1726c1729,1733
<   if (last_glyph.id != 0)
<     FT_Done_Glyph(last_glyph.image);
---
>   if (glyph.image != 0)
>     {
>       FT_Done_Glyph(glyph.image);
>       glyph.image=0;
>     }
  • magick/draw.c
    • dash_pattern のオブジェクトサイズを大きめにとる。あとzero初期化も。
    • mvg:vector-graphics へのセット。
    • ConstrainCoordinate。値のクランプ
342c342
<       clone_info->dash_pattern=(double *) AcquireQuantumMemory((size_t) (x+1),
---
>       clone_info->dash_pattern=(double *) AcquireQuantumMemory((size_t) (2*x+2),
346a347,348
>       (void) memset(clone_info->dash_pattern,0,(size_t) (2*x+2)*
>         sizeof(*clone_info->dash_pattern));
1795d1796
<         n++;
2474c2475
<   (void) SetImageArtifact(image,"MVG",primitive);
---
>   (void) SetImageArtifact(image,"mvg:vector-graphics",primitive);
4907a4909,4917
> static inline double ConstrainCoordinate(double x)
> {
>   if (x < -SSIZE_MAX)
>     return(-SSIZE_MAX);
>   if (x > SSIZE_MAX)
>     return(SSIZE_MAX);
>   return(x);
> }
>
5049,5050c5059,5060
<   x=(ssize_t) ceil(primitive_info->point.x-0.5);
<   y=(ssize_t) ceil(primitive_info->point.y-0.5);
---
>   x=(ssize_t) ceil(ConstrainCoordinate(primitive_info->point.x-0.5));
>   y=(ssize_t) ceil(ConstrainCoordinate(primitive_info->point.y-0.5));
  • magick/image.c
  • -
1776c1776
<         offset+=strlen(pattern)-4;
---
>         offset+=strlen(pattern)-strlen(value)+3;
  • www/assets/magick.css
    • Bootstrap バージョン変更
2,4c2,4
<  * Bootstrap v4.2.1 (https://getbootstrap.com/)
<  * Copyright 2011-2018 The Bootstrap Authors
<  * Copyright 2011-2018 Twitter, Inc.
---
>  * Bootstrap v4.3.0 (https://getbootstrap.com/)
>  * Copyright 2011-2019 The Bootstrap Authors
>  * Copyright 2011-2019 Twitter, Inc.
6c6
  • www/assets/magick.js
    • Bootstrap バージョン変更
2,3c2,3
<   * Bootstrap v4.2.1 (https://getbootstrap.com/)
<   * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstr
ap/graphs/contributors)
---
>   * Bootstrap v4.3.0 (https://getbootstrap.com/)
>   * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstr
ap/graphs/contributors)
6c6

ChangeLog

2019-02-12  6.9.10-28 Cristy  <quetzlzacatenango@image...>
  * Fixed a number of issues (reference
    https://github.com/ImageMagick/ImageMagick/issues).

 

IO_GIF 1.0.1 をリリースしました

sample/gifdump.php で LocalColorTable の表示を忘れていたので、追加しました。
だいたい GIF のトラブルで多いのはこれ周りなので、必須機能なのに忘れてました。