Skip to content

Commit c69ad80

Browse files
web-flowMolotovCherry
authored andcommitted
Update ImageMagick from 7.1.0-62 -> 7.1.1-0
1 parent ddd143b commit c69ad80

File tree

641 files changed

+382
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

641 files changed

+382
-278
lines changed

Android.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ OPENCL_INCLUDE_PATH := $(OPENCL_PATH)/qualcomm/include
3030

3131
LTDL_LIB_PATH := $(LOCAL_PATH)/libltdl-2.4.6
3232

33-
IMAGE_MAGICK_BASEDIR := ImageMagick-7.1.0-62
33+
IMAGE_MAGICK_BASEDIR := ImageMagick-7.1.1-0
3434
IMAGE_MAGICK := $(LOCAL_PATH)/$(IMAGE_MAGICK_BASEDIR)
3535

3636
JPEG_LIB_PATH := $(LOCAL_PATH)/libjpeg-turbo-2.0.2

ImageMagick-7.1.0-62/MagickCore/annotate.c ImageMagick-7.1.1-0/MagickCore/annotate.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,6 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info,
987987
DrawInfo
988988
*annotate_info;
989989

990-
ExceptionInfo
991-
*sans_exception;
992-
993990
MagickBooleanType
994991
status;
995992

@@ -1072,19 +1069,18 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info,
10721069
}
10731070
font=DestroyString(font);
10741071
}
1075-
sans_exception=AcquireExceptionInfo();
1076-
if (type_info == (const TypeInfo *) NULL)
1077-
type_info=GetTypeInfoByFamily("Open Sans",draw_info->style,
1078-
draw_info->stretch,draw_info->weight,sans_exception);
1079-
if (type_info == (const TypeInfo *) NULL)
1080-
type_info=GetTypeInfoByFamily("Sans Serif",draw_info->style,
1081-
draw_info->stretch,draw_info->weight,sans_exception);
10821072
if (type_info == (const TypeInfo *) NULL)
1083-
type_info=GetTypeInfoByFamily((const char *) NULL,draw_info->style,
1084-
draw_info->stretch,draw_info->weight,sans_exception);
1085-
if (type_info == (const TypeInfo *) NULL)
1086-
type_info=GetTypeInfo("*",sans_exception);
1087-
sans_exception=DestroyExceptionInfo(sans_exception);
1073+
{
1074+
ExceptionInfo
1075+
*sans_exception;
1076+
1077+
sans_exception=AcquireExceptionInfo();
1078+
type_info=GetTypeInfoByFamily((const char *) NULL,draw_info->style,
1079+
draw_info->stretch,draw_info->weight,sans_exception);
1080+
if (type_info == (const TypeInfo *) NULL)
1081+
type_info=GetTypeInfo("*",sans_exception);
1082+
sans_exception=DestroyExceptionInfo(sans_exception);
1083+
}
10881084
if (type_info == (const TypeInfo *) NULL)
10891085
{
10901086
status=RenderFreetype(image,draw_info,draw_info->encoding,offset,metrics,
@@ -1585,7 +1581,11 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
15851581
face_index=(FT_Long) draw_info->face;
15861582
(void) memset(&args,0,sizeof(args));
15871583
if (draw_info->font == (char *) NULL)
1588-
args.pathname=ConstantString("helvetica");
1584+
{
1585+
const TypeInfo *type_info = GetTypeInfo("*",exception);
1586+
if (type_info != (const TypeInfo *) NULL)
1587+
args.pathname=ConstantString(type_info->glyphs);
1588+
}
15891589
else
15901590
if (*draw_info->font != '@')
15911591
args.pathname=ConstantString(draw_info->font);
File renamed without changes.
File renamed without changes.

ImageMagick-7.1.0-62/MagickCore/cache.c ImageMagick-7.1.1-0/MagickCore/cache.c

+4
Original file line numberDiff line numberDiff line change
@@ -3695,6 +3695,10 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
36953695
((MagickSizeType) image->rows > cache_info->height_limit))
36963696
ThrowBinaryException(ImageError,"WidthOrHeightExceedsLimit",
36973697
image->filename);
3698+
if (GetPixelChannels(image) >= MaxPixelChannels)
3699+
ThrowBinaryException(ImageError,"MaximumChannelsExceeded",image->filename);
3700+
if (GetPixelMetaChannels(image) > GetPixelChannels(image))
3701+
ThrowBinaryException(ImageError,"MaximumChannelsExceeded",image->filename);
36983702
if (GetMagickResourceLimit(ListLengthResource) != MagickResourceInfinity)
36993703
{
37003704
length=GetImageListLength(image);
File renamed without changes.

ImageMagick-7.1.0-62/MagickCore/channel.c ImageMagick-7.1.1-0/MagickCore/channel.c

+32-16
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
% December 2003 %
1818
% %
1919
% %
20-
% Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization %
20+
% Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization %
2121
% dedicated to making software imaging solutions freely available. %
2222
% %
2323
% You may not use this file except in compliance with the License. You may %
@@ -131,6 +131,9 @@ static MagickBooleanType ChannelImage(Image *destination_image,
131131
ssize_t
132132
y;
133133

134+
/*
135+
Copy source channel to destination.
136+
*/
134137
height=MagickMin(source_image->rows,destination_image->rows);
135138
width=MagickMin(source_image->columns,destination_image->columns);
136139
source_view=AcquireVirtualCacheView(source_image,exception);
@@ -248,6 +251,9 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
248251
(void) GetNextToken(p,&p,MagickPathExtent,token);
249252
while (*token != '\0')
250253
{
254+
PixelTrait
255+
traits;
256+
251257
ssize_t
252258
i;
253259

@@ -305,14 +311,15 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
305311
break;
306312
}
307313
i=ParsePixelChannelOption(token);
308-
if (i < 0)
314+
source_channel=(PixelChannel) i;
315+
traits=GetPixelChannelTraits(source_image,source_channel);
316+
if (traits == UndefinedPixelTrait)
309317
{
310-
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
311-
"UnrecognizedChannelType","`%s'",token);
318+
(void) ThrowMagickException(exception,GetMagickModule(),
319+
CorruptImageError,"MissingImageChannel","`%s'",token);
312320
destination_image=DestroyImageList(destination_image);
313321
return(destination_image);
314322
}
315-
source_channel=(PixelChannel) i;
316323
channel_op=ExtractChannelOp;
317324
(void) GetNextToken(p,&p,MagickPathExtent,token);
318325
if (*token == '<')
@@ -343,6 +350,8 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
343350
else
344351
{
345352
i=ParsePixelChannelOption(token);
353+
if (LocaleCompare(token,"alpha") == 0)
354+
destination_image->alpha_trait=BlendPixelTrait;
346355
if (i < 0)
347356
{
348357
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -359,13 +368,9 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
359368
case GreenPixelChannel:
360369
case BluePixelChannel:
361370
case BlackPixelChannel:
362-
case IndexPixelChannel:
363-
break;
364371
case AlphaPixelChannel:
365-
{
366-
destination_image->alpha_trait=BlendPixelTrait;
372+
case IndexPixelChannel:
367373
break;
368-
}
369374
case CompositeMaskPixelChannel:
370375
{
371376
destination_image->channels=(ChannelType)
@@ -387,17 +392,26 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
387392
case MetaPixelChannel:
388393
default:
389394
{
390-
(void) SetPixelMetaChannels(destination_image,(size_t) (
391-
destination_channel-GetPixelChannels(destination_image)+1),
392-
exception);
395+
traits=GetPixelChannelTraits(destination_image,
396+
destination_channel);
397+
if (traits != UndefinedPixelTrait)
398+
break;
399+
(void) SetPixelMetaChannels(destination_image,
400+
GetPixelMetaChannels(destination_image)+1,exception);
401+
traits=GetPixelChannelTraits(destination_image,
402+
destination_channel);
403+
if (traits == UndefinedPixelTrait)
404+
{
405+
(void) ThrowMagickException(exception,GetMagickModule(),
406+
CorruptImageError,"MissingImageChannel","`%s'",token);
407+
destination_image=DestroyImageList(destination_image);
408+
return(destination_image);
409+
}
393410
break;
394411
}
395412
}
396413
channel_mask=(ChannelType) (channel_mask |
397414
(1UL << ParseChannelOption(token)));
398-
if (((channels >= 1) || (destination_channel >= 1)) &&
399-
(IsGrayColorspace(destination_image->colorspace) != MagickFalse))
400-
(void) SetImageColorspace(destination_image,sRGBColorspace,exception);
401415
(void) GetNextToken(p,&p,MagickPathExtent,token);
402416
break;
403417
}
@@ -440,6 +454,8 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
440454
if (status == MagickFalse)
441455
break;
442456
}
457+
if (destination_image == (Image *) NULL)
458+
return(destination_image);
443459
(void) SetPixelChannelMask(destination_image,channel_mask);
444460
if ((channel_op == ExtractChannelOp) && (channels == 1))
445461
{
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ImageMagick-7.1.0-62/MagickCore/constitute.c ImageMagick-7.1.1-0/MagickCore/constitute.c

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@
8282
#include "MagickCore/utility.h"
8383
#include "MagickCore/utility-private.h"
8484

85+
/*
86+
Define declarations.
87+
*/
88+
#define MaxReadRecursionDepth 100
89+
8590
/*
8691
Typedef declarations.
8792
*/

ImageMagick-7.1.0-62/MagickCore/draw.c ImageMagick-7.1.1-0/MagickCore/draw.c

+42-30
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ MagickExport DrawInfo *CloneDrawInfo(const ImageInfo *image_info,
380380
clone_info->composite_mask=CloneImage(draw_info->composite_mask,0,0,
381381
MagickTrue,exception);
382382
clone_info->render=draw_info->render;
383+
clone_info->image_info=CloneImageInfo(draw_info->image_info);
383384
clone_info->debug=draw_info->debug;
384385
exception=DestroyExceptionInfo(exception);
385386
return(clone_info);
@@ -1007,6 +1008,8 @@ MagickExport DrawInfo *DestroyDrawInfo(DrawInfo *draw_info)
10071008
draw_info->clipping_mask=DestroyImage(draw_info->clipping_mask);
10081009
if (draw_info->composite_mask != (Image *) NULL)
10091010
draw_info->composite_mask=DestroyImage(draw_info->composite_mask);
1011+
if (draw_info->image_info != (ImageInfo *) NULL)
1012+
draw_info->image_info=DestroyImageInfo(draw_info->image_info);
10101013
draw_info->signature=(~MagickCoreSignature);
10111014
draw_info=(DrawInfo *) RelinquishMagickMemory(draw_info);
10121015
return(draw_info);
@@ -5590,6 +5593,9 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
55905593
else
55915594
if (*primitive_info->text != '\0')
55925595
{
5596+
const MagickInfo
5597+
*magick_info;
5598+
55935599
MagickBooleanType
55945600
path_status;
55955601

@@ -5602,6 +5608,16 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
56025608
(void) CopyMagickString(clone_info->filename,primitive_info->text,
56035609
MagickPathExtent);
56045610
(void) SetImageInfo(clone_info,1,exception);
5611+
magick_info=GetMagickInfo(clone_info->magick,exception);
5612+
if ((magick_info != (const MagickInfo*) NULL) &&
5613+
(LocaleCompare(magick_info->module,"SVG") == 0))
5614+
{
5615+
(void) ThrowMagickException(exception,GetMagickModule(),
5616+
CorruptImageError,"ImageTypeNotSupported","`%s'",
5617+
clone_info->filename);
5618+
clone_info=DestroyImageInfo(clone_info);
5619+
break;
5620+
}
56055621
(void) CopyMagickString(clone_info->filename,primitive_info->text,
56065622
MagickPathExtent);
56075623
if (clone_info->size != (char *) NULL)
@@ -5987,24 +6003,21 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
59876003
ExceptionInfo
59886004
*exception;
59896005

5990-
ImageInfo
5991-
*clone_info;
5992-
59936006
/*
59946007
Initialize draw attributes.
59956008
*/
59966009
assert(draw_info != (DrawInfo *) NULL);
59976010
if (IsEventLogging() != MagickFalse)
59986011
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
59996012
(void) memset(draw_info,0,sizeof(*draw_info));
6000-
clone_info=CloneImageInfo(image_info);
6013+
draw_info->image_info=CloneImageInfo(image_info);
60016014
GetAffineMatrix(&draw_info->affine);
60026015
exception=AcquireExceptionInfo();
60036016
(void) QueryColorCompliance("#000F",AllCompliance,&draw_info->fill,
60046017
exception);
60056018
(void) QueryColorCompliance("#FFF0",AllCompliance,&draw_info->stroke,
60066019
exception);
6007-
draw_info->stroke_antialias=clone_info->antialias;
6020+
draw_info->stroke_antialias=draw_info->image_info->antialias;
60086021
draw_info->stroke_width=1.0;
60096022
draw_info->fill_rule=EvenOddRule;
60106023
draw_info->alpha=OpaqueAlpha;
@@ -6021,61 +6034,61 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
60216034
draw_info->clip_path=MagickFalse;
60226035
draw_info->debug=(GetLogEventMask() & (DrawEvent | AnnotateEvent)) != 0 ?
60236036
MagickTrue : MagickFalse;
6024-
if (clone_info->font != (char *) NULL)
6025-
draw_info->font=AcquireString(clone_info->font);
6026-
if (clone_info->density != (char *) NULL)
6027-
draw_info->density=AcquireString(clone_info->density);
6028-
draw_info->text_antialias=clone_info->antialias;
6029-
if (fabs(clone_info->pointsize) >= MagickEpsilon)
6030-
draw_info->pointsize=clone_info->pointsize;
6031-
draw_info->border_color=clone_info->border_color;
6032-
if (clone_info->server_name != (char *) NULL)
6033-
draw_info->server_name=AcquireString(clone_info->server_name);
6034-
option=GetImageOption(clone_info,"direction");
6037+
if (draw_info->image_info->font != (char *) NULL)
6038+
draw_info->font=AcquireString(draw_info->image_info->font);
6039+
if (draw_info->image_info->density != (char *) NULL)
6040+
draw_info->density=AcquireString(draw_info->image_info->density);
6041+
draw_info->text_antialias=draw_info->image_info->antialias;
6042+
if (fabs(draw_info->image_info->pointsize) >= MagickEpsilon)
6043+
draw_info->pointsize=draw_info->image_info->pointsize;
6044+
draw_info->border_color=draw_info->image_info->border_color;
6045+
if (draw_info->image_info->server_name != (char *) NULL)
6046+
draw_info->server_name=AcquireString(draw_info->image_info->server_name);
6047+
option=GetImageOption(draw_info->image_info,"direction");
60356048
if (option != (const char *) NULL)
60366049
draw_info->direction=(DirectionType) ParseCommandOption(
60376050
MagickDirectionOptions,MagickFalse,option);
60386051
else
60396052
draw_info->direction=UndefinedDirection;
6040-
option=GetImageOption(clone_info,"encoding");
6053+
option=GetImageOption(draw_info->image_info,"encoding");
60416054
if (option != (const char *) NULL)
60426055
(void) CloneString(&draw_info->encoding,option);
6043-
option=GetImageOption(clone_info,"family");
6056+
option=GetImageOption(draw_info->image_info,"family");
60446057
if (option != (const char *) NULL)
60456058
(void) CloneString(&draw_info->family,option);
6046-
option=GetImageOption(clone_info,"fill");
6059+
option=GetImageOption(draw_info->image_info,"fill");
60476060
if (option != (const char *) NULL)
60486061
(void) QueryColorCompliance(option,AllCompliance,&draw_info->fill,
60496062
exception);
6050-
option=GetImageOption(clone_info,"gravity");
6063+
option=GetImageOption(draw_info->image_info,"gravity");
60516064
if (option != (const char *) NULL)
60526065
draw_info->gravity=(GravityType) ParseCommandOption(MagickGravityOptions,
60536066
MagickFalse,option);
6054-
option=GetImageOption(clone_info,"interline-spacing");
6067+
option=GetImageOption(draw_info->image_info,"interline-spacing");
60556068
if (option != (const char *) NULL)
60566069
draw_info->interline_spacing=GetDrawValue(option,&next_token);
6057-
option=GetImageOption(clone_info,"interword-spacing");
6070+
option=GetImageOption(draw_info->image_info,"interword-spacing");
60586071
if (option != (const char *) NULL)
60596072
draw_info->interword_spacing=GetDrawValue(option,&next_token);
6060-
option=GetImageOption(clone_info,"kerning");
6073+
option=GetImageOption(draw_info->image_info,"kerning");
60616074
if (option != (const char *) NULL)
60626075
draw_info->kerning=GetDrawValue(option,&next_token);
6063-
option=GetImageOption(clone_info,"stroke");
6076+
option=GetImageOption(draw_info->image_info,"stroke");
60646077
if (option != (const char *) NULL)
60656078
(void) QueryColorCompliance(option,AllCompliance,&draw_info->stroke,
60666079
exception);
6067-
option=GetImageOption(clone_info,"strokewidth");
6080+
option=GetImageOption(draw_info->image_info,"strokewidth");
60686081
if (option != (const char *) NULL)
60696082
draw_info->stroke_width=GetDrawValue(option,&next_token);
6070-
option=GetImageOption(clone_info,"style");
6083+
option=GetImageOption(draw_info->image_info,"style");
60716084
if (option != (const char *) NULL)
60726085
draw_info->style=(StyleType) ParseCommandOption(MagickStyleOptions,
60736086
MagickFalse,option);
6074-
option=GetImageOption(clone_info,"undercolor");
6087+
option=GetImageOption(draw_info->image_info,"undercolor");
60756088
if (option != (const char *) NULL)
60766089
(void) QueryColorCompliance(option,AllCompliance,&draw_info->undercolor,
60776090
exception);
6078-
option=GetImageOption(clone_info,"weight");
6091+
option=GetImageOption(draw_info->image_info,"weight");
60796092
if (option != (const char *) NULL)
60806093
{
60816094
ssize_t
@@ -6086,13 +6099,12 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
60866099
weight=(ssize_t) StringToUnsignedLong(option);
60876100
draw_info->weight=(size_t) weight;
60886101
}
6089-
option=GetImageOption(clone_info,"word-break");
6102+
option=GetImageOption(draw_info->image_info,"word-break");
60906103
if (option != (const char *) NULL)
60916104
draw_info->word_break=(WordBreakType) ParseCommandOption(
60926105
MagickWordBreakOptions,MagickFalse,option);
60936106
exception=DestroyExceptionInfo(exception);
60946107
draw_info->signature=MagickCoreSignature;
6095-
clone_info=DestroyImageInfo(clone_info);
60966108
}
60976109

60986110
/*

ImageMagick-7.1.0-62/MagickCore/draw.h ImageMagick-7.1.1-0/MagickCore/draw.h

+3
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ typedef struct _DrawInfo
350350

351351
WordBreakType
352352
word_break;
353+
354+
ImageInfo
355+
*image_info;
353356
} DrawInfo;
354357

355358
typedef struct _PrimitiveInfo
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)