yoyaのメモ

2016/09/21(Wed) ImageMagick-6.9.5-10差分

[]ImageMagick-6.9.5-10差分

ImageMagick-6.9.5-9差分 - yoyaのメモの続き

The latest release of ImageMagick is version 6.9.5-10

まとめ

  • PSD のレイヤーRLE圧縮対応。
  • psd:preserve-opacity-mask 追加
  • EXR の windows 問題修正

差分

ChangeLog の分
  • PSD ファイルの opacity マスクを保持する define 'psd:preserve-opacity-mask' を追加。
ChangeLogにない差分


ChangeLog

2016-09-05  6.9.5-10 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.5-10, GIT revision 11054:ddda572:20160920.

2016-09-17  6.9.5-10 Dirk Lemstra <dirk@lem.....org>
  * Added layer RLE compression to the PSD encoder.
  * Added define 'psd:preserve-opacity-mask' to preserve the opacity mask
    in a PSD file.
  * Fixed issue where the display window was used instead of the data window
    when reading EXR files (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&p=137849).

2016/09/06(Tue) ImageMagick-6.9.5-9差分

[]ImageMagick-6.9.5-9差分

ImageMagick-6.9.5-8差分 - yoyaのメモの続き

The latest release of ImageMagick is version 6.9.5-9

まとめ

差分

ChangeLog の分
ChangeLogにない差分
  • coders/dds.c
    • image->rows でなく dds->height を参照
1895c1895
<   for (y = 0; y < (ssize_t) dds_info->height; y += 4)
---
>   for (y = 0; y < (ssize_t) image->rows; y += 4)
<同様のがたくさん>

1925,1927c1926,1927
<               if (colors.a[code] && image->matte == MagickFalse)
<                 /* Correct matte */
<                 image->matte = MagickTrue;
---
>               if ((colors.a[code] != 0) && (image->matte == MagickFalse))
>                 image->matte=MagickTrue; /* Correct matte */
    • パディング?
1572c1572,1574
<             length=(length+(4-(length % 4)))-length;
---
>             if ((length % 4) != 0)
>               {
>                 length=4-(length % 4);
1580a1583
>               }
2017c2020
<   if ((has_merged_image == MagickFalse) && (GetImageListLength(image) > 1))
---
>   if (has_merged_image == MagickFalse)
2504a2505
>     if (number_bins.red > MagickEpsilon)
2507a2509
>     if (number_bins.green > MagickEpsilon)
2510a2513
>     if (number_bins.blue > MagickEpsilon)
2515a2519
>         if (number_bins.opacity > MagickEpsilon)
2522a2527
>         if (number_bins.index > MagickEpsilon)
  • /magick/vision.c
    • 変数名を変えただけ(のはず)
154c154
<     *p;
---
>     *c;
277c277
<           object,
---
>           obj,

ChangeLog

2016-08-31  6.9.5-9 Dirk Lemstra <dirk@lem.....org>
  * Fixed incorrect padding calculation in PSD encoder.

2016/08/28(Sun) ImageMagick-6.9.5-8差分

[]ImageMagick-6.9.5-8差分

ImageMagick-6.9.5-7差分 - yoyaのメモの続き

The latest release of ImageMagick is version 6.9.5-8

まとめ

差分

ChangeLog の分
  • PDS ファイルの中に追加情報を保存する為の psd:additional-info の定義を追加
  • coders/psd.c
    • DestroyLayerInfo の削除対象に info(String)も追加
>     if (layer_info[i].info != (StringInfo *) NULL)
>       layer_info[i].info=DestroyStringInfo(layer_info[i].info);
1565,1572c1572,1575
<             /*
<                Skip the rest of the variable data until we support it.
<              */
<              if (image->debug != MagickFalse)
<                (void) LogMagickEvent(CoderEvent,GetMagickModule(),
<                  "      unsupported data: length=%.20g",(double)
<                  ((MagickOffsetType) (size-combined_length)));
<              if (DiscardBlobBytes(image,(MagickSizeType) (size-combined_length)) == MagickFalse)
---
>             length=(length+(4-(length % 4)))-length;
>             combined_length+=length;
>             /* Skip over the padding of the layer name */
>             if (DiscardBlobBytes(image,length) == MagickFalse)
1577a1581,1590
>             length=(MagickSizeType) size-combined_length;
>             if (length > 0)
>               {
>                 unsigned char
>                   *info;
>
>                 layer_info[i].info=AcquireStringInfo((const size_t) length);
>                 info=GetStringInfoDatum(layer_info[i].info);
>                 (void) ReadBlob(image,(const size_t) length,info);
>               }
1605a1619,1625
>
>         if (layer_info[i].info != (StringInfo *) NULL)
>           {
>             (void) SetImageProfile(layer_info[i].image,PSDAdditionalInfo,
>               layer_info[i].info);
>             layer_info[i].info=DestroyStringInfo(layer_info[i].info);
>           }
2612a2633,2732
> static const StringInfo *GetAdditionalInformation(const ImageInfo *image_info,
>   Image *image)
<略>

2016-08-15 6.9.5-8 Cristy <quetzlzacatenango@image...>

>     if ((image->columns != (signed int) image->columns) ||
>         (image->rows != (signed int) image->rows))
>       ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
ChangeLogにない差分
  • coders/map.c
    • カラーマップの作り直しで、古い depth でなく古い colors から新しい depth を判断。
    • ScaleQuantumToChar を呼ぶ
<   if (image->depth <= 8)
---
>   q=colormap;
>   if (image->colors <= 256)
407,409c408,410
<       *q++=(unsigned char) image->colormap[i].red;
<       *q++=(unsigned char) image->colormap[i].green;
<       *q++=(unsigned char) image->colormap[i].blue;
---
>       *q++=(unsigned char) ScaleQuantumToChar(image->colormap[i].red);
>       *q++=(unsigned char) ScaleQuantumToChar(image->colormap[i].green);
>       *q++=(unsigned char) ScaleQuantumToChar(image->colormap[i].blue);
414,419c415,420
  • magick/memory-private.h
25c25
< #if defined(MAGICK_TARGET_CPU) && (MAGICK_TARGET_CPU == powerpc)
---
> #if defined(__powerpc__)
  • magick/option.c
167a168,173
>     { "0", 0, UndefinedOptionFlag, MagickFalse },
>     { "1", 1, UndefinedOptionFlag, MagickFalse },
>     { "2", 2, UndefinedOptionFlag, MagickFalse },
>     { "3", 3, UndefinedOptionFlag, MagickFalse },
>     { "4", 4, UndefinedOptionFlag, MagickFalse },
>     { "5", 5, UndefinedOptionFlag, MagickFalse },

ChangeLog

2016-08-27  6.9.5-8 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.5-8, GIT revision 11015:e3335b3:20160827.

2016-08-27  6.9.5-8 Dirk Lemstra <dirk@lem.....org>
  * Added define 'psd:additional-info' to preserve the additional information
    in a PSD file.

2016-08-15  6.9.5-8 Cristy  <quetzlzacatenango@image...>
  * Prevent buffer overflow in BMP & SGI coders (bug report from
          pwchen&rayzhong of tencent).
  * Fix MSVG regression (reference
    https://github.com/ImageMagick/ImageMagick/issues/252).
  * Prevent buffer overflow and other problems in SIXEL, PDB, MAP, TIFF, and
          CALS coders (bug report from Donghai Zhu).

2016/08/25(Thu) Varnish 4.1.3 を MacOS でビルド

Varnish 4.1.3 を MacOSビルド

rst2man がない

$ ./configure
<略>
checking for rst2man... no
checking for rst2man.py... no
configure: error: rst2man is needed to build Varnish, please install python-docutils.
$ brew install rst2man
Error: No available formula with the name "rst2man"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
$ 

rst2man で検索したらいきなり答えにたどり着く。

| I have tried installing rst2man but it cannot be found since it's a virtual package?:

It comes from python-docutils.

$ brew install  docutils
==> Downloading https://homebrew.bintray.com/bottles/docutils-0.12.yosemite.bott
######################################################################## 100.0%
==> Pouring docutils-0.12.yosemite.bottle.tar.gz
<略>
==> Summary
&#127866;  /usr/local/Cellar/docutils/0.12: 193 files, 1.8M
$

dpkg や rpmpython-docutils ズバリの名前だけど、brew は docutils です。

No module named docutils.core

$ make
Making all in man
rst2man.py --halt=2 ../doc/sphinx/reference/vsl.rst vsl.7
Traceback (most recent call last):
  File "/usr/local/bin/rst2man.py", line 21, in <module>
    from docutils.core import publish_cmdline, default_description
ImportError: No module named docutils.core

まさか。。

$ head -1 /usr/local/bin/rst2man.py
#!/usr/bin/python

おいコラ。

標準 Python の方に docutils を入れる事にします。(多分駄目な方法なので、良い方法教えて下さい)

まず pip さえ入ってなかったので、そこから。

$ sudo /usr/bin/easy_install pip
Best match: pip 8.1.2
Downloading https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz#md5=87083c0b9867963b29f7aba3613e8f4a
<略>
Installed /Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
$ 

う。。/usr/local/bin にある brew の pip を上書きしちゃった。。

    • prefix を指定しても駄目なので、今度考える。今回はごっちゃで。
 $ pip install docutils
Requirement already satisfied (use --upgrade to upgrade): docutils in /Library/Python/2.7/site-packages

あれ。。brew で入れた方を見てるのかな。

 $ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in include
<略>
Making all in man
rst2man.py --halt=2 ../doc/sphinx/reference/vsl.rst vsl.7
rst2man.py --halt=2 ../doc/sphinx/reference/varnishd.rst varnishd.1
rst2man.py --halt=2 ../doc/sphinx/reference/varnishhist.rst varnishhist.1
rst2man.py --halt=2 ../doc/sphinx/reference/varnishlog.rst varnishlog.1
rst2man.py --halt=2 ../doc/sphinx/reference/varnishncsa.rst varnishncsa.1
rst2man.py --halt=2 ../doc/sphinx/reference/varnishtop.rst varnishtop.1
rst2man.py --halt=2 ../lib/libvmod_directors/vmod_directors.man.rst vmod_directors.3
rst2man.py --halt=2 ../lib/libvmod_std/vmod_std.man.rst vmod_std.3
$ 

通った。。気持ち悪いけど、今回マニュアルはどうでもよいので、これで良しとしよう。

でも、将来的に禍根が残りそうなので、うまい方法誰か教えて下さい。

2016/08/15(Mon) ImageMagick-6.9.5-7差分

[]ImageMagick-6.9.5-7差分

ImageMagick-6.9.5-6差分 - yoyaのメモの続き

The latest release of ImageMagick is version 6.9.5-7

まとめ

差分

ChangeLog の分

ChangeLogにない差分

ChangeLog

2016-08-14  6.9.5-7 Cristy  <quetzlzacatenango@image...>
  * Eliminate compiler warning.