ImageMagick-6.9.10-25差分
ImageMagick-6.9.10-25差分
http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 6.9.10-25
7 系同時リリースは ImageMagick-7.0.8-25
まとめ
気になる事
- tolower/toupper の代わりに Locale 関数の LocaleLowercase/LocaleUppercase を呼ぶようにした箇所が沢山ある。
- これで大文字や小文字への変換が直感的になるケースがある?
You may not use this file except in compliance with the License.
obtain a copy of the License at
これを
You may not use this file except in compliance with the License. You may
obtain a copy of the License at
に書き換えてる。大量に。
ChangeLog にない差分
- coders/bmp.c
- 画像が途中で途切れてないかのチェックの計算ミス。ここスルーしても別の箇所でエラーになるので恐らく実害ない。
- bmp_colormap のメモリ確保に失敗した時に、pixel_info を解放してなかった。これも意図的には作るのは難しい。
967a968,969 > if ((MagickSizeType) (length/256) > GetBlobSize(image)) > ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); 971,972d972 < if ((MagickSizeType) length > GetBlobSize(image)) < ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); 2321a2322,2323 > { > pixel_info=RelinquishVirtualMemory(pixel_info); 2322a2325 > }
- coders/dib.c
- dib_colormap のメモリ確保出来ない時に、 pixels がメモリリークしてた。(カラーマップは固定でそんな大きくないので意図的に発生させるのは難しい。実害はなさそう)
1382a1383,1384 > { > pixels=(unsigned char *) RelinquishMagickMemory(pixels); 1383a1386 > }
- coders/fits.c
- tolower の代わりに Locale関数の方を呼ぶ
334c334 < keyword[i]=tolower((int) ((unsigned char) keyword[i])); --- > keyword[i]=LocaleLowercase((int) ((unsigned char) keyword[i]));
- coders/json.c
- tolower の代わりに Locale関数の方を呼ぶ
1113c1113 < *target=(char) toupper((int) ((unsigned char) *target)); --- > *target=(char) LocaleUppercase((int) ((unsigned char) *target));
- coders/meta.c
181c181< i=toupper(i);
-
- -
> i=LocaleUppercase(i);
184c184< j=toupper(j);
-
- -
> j=LocaleUppercase(j);
193c193< return(toupper*1;
-
- -
> return(LocaleUppercase*2;
|
- coders/psd.c
- ReadPSDLayersInternal で top/left の右下に bottom/right がある事のチェックを追加。
1639,1640c1639,1642 < x, < y; --- > top, > left, > bottom, > right; 1645,1650c1647,1660 < layer_info[i].page.y=(ssize_t) ReadBlobSignedLong(image); < layer_info[i].page.x=(ssize_t) ReadBlobSignedLong(image); < y=(ssize_t) ReadBlobSignedLong(image); < x=(ssize_t) ReadBlobSignedLong(image); < layer_info[i].page.width=(size_t) (x-layer_info[i].page.x); < layer_info[i].page.height=(size_t) (y-layer_info[i].page.y); --- > top=(ssize_t) ReadBlobSignedLong(image); > left=(ssize_t) ReadBlobSignedLong(image); > bottom=(ssize_t) ReadBlobSignedLong(image); > right=(ssize_t) ReadBlobSignedLong(image); > if ((right < left) || (bottom < top)) > { > layer_info=DestroyLayerInfo(layer_info,number_layers); > ThrowBinaryException(CorruptImageError,"ImproperImageHeader", > image->filename); > } > layer_info[i].page.y=top; > layer_info[i].page.x=left; > layer_info[i].page.width=(size_t) (right-left); > layer_info[i].page.height=(size_t) (bottom-top); 2707a2718,2719 > compressed_pixels=(unsigned char *) RelinquishMagickMemory( > compressed_pixels);
- coders/sixel.c
- sixel_decode で失敗した時に sixel_pixels のメモリ解放を忘れてた。メモリリークになりそう?
1058a1059 > sixel_pixels=(unsigned char *) RelinquishMagickMemory(sixel_pixels);
- coders/tiff.c
- 主に宣言型の整理。VMS で JPEGCompression を有効にした。(なんで VMS だけ?)
- 動作に影響がないリファイン。ORIENTATION_TOPLEFT を初期値的に入れて image->orientation がある時に上書きしてたけど、image-orientation 処理の else 説で TOPLEFT を入れるようにした。
41a42,44 > #ifdef __VMS > #define JPEG_SUPPORT 1 > #endif 90c93 < # include "tiffconf.h" --- > # include <tiffconf.h> 92,93c95,96 < # include "tiff.h" < # include "tiffio.h" --- > # include <tiff.h> > # include <tiffio.h> 230,231c233 < /* Setting the mode to a value that won't change the colorspace */ < info->mode=10; --- > info->mode=10; /* Set mode to a value that won't change the colorspace */ 329c331 < static inline size_t WriteLSBLong(FILE *file,const size_t value) --- > static inline size_t WriteLSBLong(FILE *file,const unsigned int value) 396a399,400 > if (length != 10) > ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); 407c411 < length=WriteLSBLong(file,(size_t) strip_offset); --- > length=WriteLSBLong(file,(unsigned int) strip_offset); 409c413 < length=WriteLSBLong(file,(size_t) image_info->orientation); --- > length=WriteLSBLong(file,(unsigned int) image_info->orientation); 416c420 < length=WriteLSBLong(file,(size_t) (strip_offset-8)); --- > length=WriteLSBLong(file,(unsigned int) (strip_offset-8)); 418c422 < length=WriteLSBLong(file,(size_t) (strip_offset-8)); --- > length=WriteLSBLong(file,(unsigned int) (strip_offset-8)); 421c425 < length=WriteLSBLong(file,(size_t) (image->x_resolution+0.5)); --- > length=WriteLSBLong(file,(unsigned int) image->x_resolution); 1044c1048 < static void TIFFReadPhotoshopLayers(Image* image,const ImageInfo *image_info, --- > static void TIFFReadPhotoshopLayers(const ImageInfo *image_info,Image *image, 1055a1060,1062 > ImageInfo > *clone_info; > 1096c1103,1106 < (void) ReadPSDLayers(layers,image_info,&info,MagickFalse,exception); --- clone_info=CloneImageInfo(image_info); > clone_info->number_scenes=0; > (void) ReadPSDLayers(layers,clone_info,&info,MagickFalse,exception); > clone_info=DestroyImageInfo(clone_info); 2177c2187 < TIFFReadPhotoshopLayers(image,image_info,exception); --- > TIFFReadPhotoshopLayers(image_info,image,exception); 3579d3588 < (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT); 3787a3797,3798 > else > (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT);
- coders/ttf.c
- 開発中の試行錯誤?
54a55 > #include "magick/resource_.h" 255c256,257 < draw_info->font=AcquireString(image->filename); --- > draw_info->font=AcquireString(""); > (void) ImageToFile(image,draw_info->font,exception); 289a292 > (void) RelinquishUniqueFileResource(draw_info->font);
- /magick/configure.c
- AddConfigureKey で処理を整理。
(ごっそり変わってる)
- magick/display.c
- toupper で Locale 関数を使う。
14482c14482,14483 < class_hints->res_class[0]=(char) toupper((int) class_hints->res_class[0]); --- > class_hints->res_class[0]=(char) LocaleUppercase((int) > class_hints->res_class[0]);
- magick/fx.c
- CharcoalImage で ClampImage をはじめに追加。あとエラーハンドリングを真面目にやる。(どれも失敗する事なさそうなメソッドだけど)
93a94 > #include "magick/threshold.h" 630a632,634 > MagickBooleanType > status; > 639a644,646 > charcoal_image=(Image *) NULL; > status=ClampImage(edge_image); > if (status != MagickFalse) 644,646c651,657 < (void) NormalizeImage(charcoal_image); < (void) NegateImage(charcoal_image,MagickFalse); < (void) GrayscaleImage(charcoal_image,image->intensity); --- > status=NormalizeImage(charcoal_image); > if (status != MagickFalse) > status=NegateImage(charcoal_image,MagickFalse); > if (status != MagickFalse) > status=GrayscaleImage(charcoal_image,image->intensity); > if (status == MagickFalse) > charcoal_image=DestroyImage(charcoal_image); 4631,4633c4642,4648 < (void) NormalizeImage(dodge_image); < (void) NegateImage(dodge_image,MagickFalse); < (void) TransformImage(&dodge_image,(char *) NULL,"50%"); --- > status=ClampImage(dodge_image); > if (status != MagickFalse) > status=NormalizeImage(dodge_image); > if (status != MagickFalse) > status=NegateImage(dodge_image,MagickFalse); > if (status != MagickFalse) > status=TransformImage(&dodge_image,(char *) NULL,"50%");
ChangeLog
2019-01-27 6.9.10-25 Cristy <quetzlzacatenango@image...> * Release ImageMagick version 6.9.10-25, GIT revision 14167:183ec9d88:20190127 2019-01-19 6.9.10-25 Cristy <quetzlzacatenango@image...> * Eliminate spurious font warning (reference https://github.com/ImageMagick/ImageMagick/issues/1458). * Support HEIC EXIF & XMP profiles.