[-]
[+]
|
Changed |
_service:tar_git:ImageMagick.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://gitlab.com/nephros/harbour-imagemagick</param>
<param name="branch">obs</param>
- <param name="revision">7.1.0.8+obs1.1</param>
+ <param name="revision">7.1.0.9+obs1.1</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/.github/workflows/main.yml
^
|
@@ -17,7 +17,7 @@
runs-on: ubuntu-latest
strategy:
- fail-fast: true
+ fail-fast: false
matrix:
compiler: [ gcc, clang ]
@@ -71,9 +71,14 @@
make install
build_windows:
- name: Build Windows
+ name: Build Windows ${{matrix.platform}}
runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [ Win32, x64 ]
+
steps:
- uses: actions/checkout@v2
with:
@@ -104,14 +109,14 @@
shell: cmd
run: |
cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
- configure.exe /noWizard /VS2019 /x64 /smtd
+ configure.exe /noWizard /VS2019 /${{matrix.platform}} /smtd
- name: Build ImageMagick
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick
- msbuild VisualStaticMTD.sln /m /t:Rebuild /p:Configuration=Release,Platform=x64
+ msbuild VisualStaticMTD.sln /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.platform}}
build_msys2:
name: Build MSYS2
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/ChangeLog
^
|
@@ -1,3 +1,15 @@
+2021-10-03 7.1.0-9 <quetzlzacatenango@image...>
+ * Release ImageMagick version 7.1.0-9 GIT revision 19220:7921bf068:20211003
+
+2021-10-03 7.1.0-9 Dirk Lemstra <dirk@lem.....org>
+ * Squash a dump truck load of VisualStudio compiler warnings.
+ * improved algorithm for automatic calculation of word breaks and pointsize
+ for caption and labels.
+
+2021-09-19 7.1.0-9 <quetzlzacatenango@image...>
+ * improve wrapping between words and within words (reference
+ https://github.com/ImageMagick/ImageMagick/discussions/4227).
+
2021-09-18 7.1.0-8 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-8 GIT revision 19115:428fe1921:20210918
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/ImageMagick.spec.in
^
|
@@ -136,7 +136,7 @@
%build
autoconf -f -i
-export CFLAGS="%{optflags} -DIMPNG_SETJMP_IS_THREAD_SAFE"
+export CFLAGS="%{optflags}"
%configure --enable-shared \
--disable-static \
--with-modules \
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/Magick++/lib/Color.cpp
^
|
@@ -261,8 +261,6 @@
pixel.colorspace=(_pixelType == RGBPixel || _pixelType == RGBAPixel) ?
sRGBColorspace : CMYKColorspace;
- pixel.alpha_trait=(_pixelType == RGBAPixel || _pixelType == CMYKAPixel) ?
- BlendPixelTrait : UndefinedPixelTrait;
pixel.depth=MAGICKCORE_QUANTUM_DEPTH;
pixel.alpha=_pixel->alpha;
pixel.alpha_trait=_pixel->alpha_trait;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/annotate.c
^
|
@@ -588,6 +588,37 @@
% o exception: return any errors or warnings in this structure.
%
*/
+
+static inline char *ReplaceSpaceWithNewline(char **caption,char *space)
+{
+ size_t
+ octets;
+
+ octets=(size_t) GetUTFOctets(space);
+ if (octets == 1)
+ *space='\n';
+ else
+ {
+ char
+ *target;
+
+ size_t
+ length,
+ offset;
+
+ length=strlen(*caption);
+ *space='\n';
+ offset=space-(*caption);
+ target=AcquireString(*caption);
+ CopyMagickString(target,*caption,offset+2);
+ ConcatenateMagickString(target,space+octets,length);
+ (void) DestroyString(*caption);
+ *caption=target;
+ space=(*caption)+offset;
+ }
+ return(space);
+}
+
MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info,
const MagickBooleanType split,TypeMetric *metrics,char **caption,
ExceptionInfo *exception)
@@ -600,26 +631,34 @@
*q,
*s;
- ssize_t
- i;
-
size_t
width;
ssize_t
+ i,
n;
q=draw_info->text;
s=(char *) NULL;
+ width=0;
for (p=(*caption); GetUTFCode(p) != 0; p+=GetUTFOctets(p))
{
- if (IsUTFSpace(GetUTFCode(p)) != MagickFalse)
- s=p;
- if (GetUTFCode(p) == '\n')
+ int
+ code;
+
+ code=GetUTFCode(p);
+ if (code == '\n')
{
q=draw_info->text;
continue;
}
+ if ((IsUTFSpace(code) != MagickFalse) &&
+ (IsNonBreakingUTFSpace(code) == MagickFalse))
+ {
+ s=p;
+ if (width > image->columns)
+ p=ReplaceSpaceWithNewline(caption,s);
+ }
for (i=0; i < (ssize_t) GetUTFOctets(p); i++)
*q++=(*(p+i));
*q='\0';
@@ -630,12 +669,7 @@
if (width <= image->columns)
continue;
if (s != (char *) NULL)
- {
- for (i=0; i < (ssize_t) GetUTFOctets(s); i++)
- *(s+i)=' ';
- *s='\n';
- p=s;
- }
+ p=ReplaceSpaceWithNewline(caption,s);
else
if ((split != MagickFalse) || (GetUTFOctets(p) > 2))
{
@@ -1652,17 +1686,13 @@
ft_status=FT_Outline_Get_BBox(&outline,&bounds);
if (ft_status != 0)
continue;
- if ((p == draw_info->text) || (bounds.xMin < metrics->bounds.x1))
- if (bounds.xMin != 0)
+ if ((bounds.xMin < metrics->bounds.x1) && (bounds.xMin != 0))
metrics->bounds.x1=(double) bounds.xMin;
- if ((p == draw_info->text) || (bounds.yMin < metrics->bounds.y1))
- if (bounds.yMin != 0)
+ if ((bounds.yMin < metrics->bounds.y1) && (bounds.yMin != 0))
metrics->bounds.y1=(double) bounds.yMin;
- if ((p == draw_info->text) || (bounds.xMax > metrics->bounds.x2))
- if (bounds.xMax != 0)
+ if ((bounds.xMax > metrics->bounds.x2) && (bounds.xMax != 0))
metrics->bounds.x2=(double) bounds.xMax;
- if ((p == draw_info->text) || (bounds.yMax > metrics->bounds.y2))
- if (bounds.yMax != 0)
+ if ((bounds.yMax > metrics->bounds.y2) && (bounds.yMax != 0))
metrics->bounds.y2=(double) bounds.yMax;
if (((draw_info->stroke.alpha != TransparentAlpha) ||
(draw_info->stroke_pattern != (Image *) NULL)) &&
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/attribute.c
^
|
@@ -430,24 +430,24 @@
{
char
*edges,
- *p,
- *q;
+ *q,
+ *r;
bounds.width=(size_t) image->columns;
bounds.height=(size_t) image->rows;
bounds.x=0;
bounds.y=0;
edges=AcquireString(artifact);
- q=edges;
- while ((p=StringToken(",",&q)) != (char *) NULL)
+ r=edges;
+ while ((q=StringToken(",",&r)) != (char *) NULL)
{
- if (LocaleCompare(p,"north") == 0)
+ if (LocaleCompare(q,"north") == 0)
bounds.y=(ssize_t) image->rows;
- if (LocaleCompare(p,"east") == 0)
+ if (LocaleCompare(q,"east") == 0)
bounds.width=0;
- if (LocaleCompare(p,"south") == 0)
+ if (LocaleCompare(q,"south") == 0)
bounds.height=0;
- if (LocaleCompare(p,"west") == 0)
+ if (LocaleCompare(q,"west") == 0)
bounds.x=(ssize_t) image->columns;
}
edges=DestroyString(edges);
@@ -490,7 +490,7 @@
bounding_box;
const Quantum
- *magick_restrict p;
+ *magick_restrict q;
ssize_t
x;
@@ -501,8 +501,8 @@
# pragma omp critical (MagickCore_GetImageBoundingBox)
#endif
bounding_box=bounds;
- p=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception);
- if (p == (const Quantum *) NULL)
+ q=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception);
+ if (q == (const Quantum *) NULL)
{
status=MagickFalse;
continue;
@@ -510,7 +510,7 @@
pixel=zero;
for (x=0; x < (ssize_t) image->columns; x++)
{
- GetPixelInfoPixel(image,p,&pixel);
+ GetPixelInfoPixel(image,q,&pixel);
if ((x < bounding_box.x) &&
(IsFuzzyEquivalencePixelInfo(&pixel,&target[0]) == MagickFalse))
bounding_box.x=x;
@@ -530,7 +530,7 @@
bounding_box.width=(size_t) x;
bounding_box.height=(size_t) y;
}
- p+=GetPixelChannels(image);
+ q+=GetPixelChannels(image);
}
#if defined(MAGICKCORE_OPENMP_SUPPORT)
# pragma omp critical (MagickCore_GetImageBoundingBox)
@@ -614,6 +614,7 @@
/*
Most dominant color of edges/corners is the background color of the image.
*/
+ memset(&edge_background,0,sizeof(edge_background));
artifact=GetImageArtifact(image,"convex-hull:background-color");
if (artifact == (const char *) NULL)
artifact=GetImageArtifact(image,"background");
@@ -960,7 +961,9 @@
}
image_view=AcquireVirtualCacheView(image,exception);
#if !defined(MAGICKCORE_HDRI_SUPPORT)
+ DisableMSCWarning(4127)
if ((1UL*QuantumRange) <= MaxMap)
+ RestoreMSCWarning
{
size_t
*depth_map;
@@ -973,10 +976,7 @@
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
for (i=0; i <= (ssize_t) MaxMap; i++)
{
- unsigned int
- depth;
-
- for (depth=1; depth < MAGICKCORE_QUANTUM_DEPTH; depth++)
+ for (depth=1; depth < (size_t) MAGICKCORE_QUANTUM_DEPTH; depth++)
{
Quantum
pixel;
@@ -1014,16 +1014,16 @@
for (x=0; x < (ssize_t) image->columns; x++)
{
ssize_t
- i;
+ j;
- for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
+ for (j=0; j < (ssize_t) GetPixelChannels(image); j++)
{
- PixelChannel channel = GetPixelChannelChannel(image,i);
+ PixelChannel channel = GetPixelChannelChannel(image,j);
PixelTrait traits = GetPixelChannelTraits(image,channel);
if ((traits & UpdatePixelTrait) == 0)
continue;
- if (depth_map[ScaleQuantumToMap(p[i])] > current_depth[id])
- current_depth[id]=depth_map[ScaleQuantumToMap(p[i])];
+ if (depth_map[ScaleQuantumToMap(p[j])] > current_depth[id])
+ current_depth[id]=depth_map[ScaleQuantumToMap(p[j])];
}
p+=GetPixelChannels(image);
}
@@ -1066,9 +1066,9 @@
for (x=0; x < (ssize_t) image->columns; x++)
{
ssize_t
- i;
+ j;
- for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
+ for (j=0; j < (ssize_t) GetPixelChannels(image); j++)
{
PixelChannel
channel;
@@ -1076,7 +1076,7 @@
PixelTrait
traits;
- channel=GetPixelChannelChannel(image,i);
+ channel=GetPixelChannelChannel(image,j);
traits=GetPixelChannelTraits(image,channel);
if ((traits & UpdatePixelTrait) == 0)
continue;
@@ -1086,7 +1086,7 @@
range;
range=GetQuantumRange(current_depth[id]);
- if (p[i] == ScaleAnyToQuantum(ScaleQuantumToAny(p[i],range),range))
+ if (p[j] == ScaleAnyToQuantum(ScaleQuantumToAny(p[j],range),range))
break;
current_depth[id]++;
}
@@ -1265,9 +1265,6 @@
for (j=0; j < (ssize_t) number_hull_vertices; j++)
{
- double
- diameter;
-
diameter=fabs(getFeretDiameter(&vertices[i],
&vertices[(i+1) % number_hull_vertices],&vertices[j]));
if (min_diameter < diameter)
@@ -1972,7 +1969,9 @@
status=MagickTrue;
image_view=AcquireAuthenticCacheView(image,exception);
#if !defined(MAGICKCORE_HDRI_SUPPORT)
+ DisableMSCWarning(4127)
if ((1UL*QuantumRange) <= MaxMap)
+ RestoreMSCWarning
{
Quantum
*depth_map;
@@ -2013,9 +2012,9 @@
for (x=0; x < (ssize_t) image->columns; x++)
{
ssize_t
- i;
+ j;
- for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
+ for (j=0; j < (ssize_t) GetPixelChannels(image); j++)
{
PixelChannel
channel;
@@ -2023,11 +2022,11 @@
PixelTrait
traits;
- channel=GetPixelChannelChannel(image,i);
+ channel=GetPixelChannelChannel(image,j);
traits=GetPixelChannelTraits(image,channel);
if ((traits & UpdatePixelTrait) == 0)
continue;
- q[i]=depth_map[ScaleQuantumToMap(q[i])];
+ q[j]=depth_map[ScaleQuantumToMap(q[j])];
}
q+=GetPixelChannels(image);
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/cache.c
^
|
@@ -2319,7 +2319,7 @@
%
*/
MagickExport void *GetPixelCachePixels(Image *image,MagickSizeType *length,
- ExceptionInfo *exception)
+ ExceptionInfo *magick_unused(exception))
{
CacheInfo
*magick_restrict cache_info;
@@ -2328,8 +2328,7 @@
assert(image->signature == MagickCoreSignature);
assert(image->cache != (Cache) NULL);
assert(length != (MagickSizeType *) NULL);
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
+ magick_unreferenced(exception);
cache_info=(CacheInfo *) image->cache;
assert(cache_info->signature == MagickCoreSignature);
*length=cache_info->length;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/compare.c
^
|
@@ -1385,7 +1385,7 @@
status;
ssize_t
- i;
+ j;
size_t
columns,
@@ -1575,13 +1575,13 @@
}
image_view=DestroyCacheView(image_view);
reconstruct_view=DestroyCacheView(reconstruct_view);
- for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
+ for (j=0; j < (ssize_t) GetPixelChannels(image); j++)
{
- PixelChannel channel = GetPixelChannelChannel(image,i);
+ PixelChannel channel = GetPixelChannelChannel(image,j);
PixelTrait traits = GetPixelChannelTraits(image,channel);
if ((traits == UndefinedPixelTrait) || ((traits & UpdatePixelTrait) == 0))
continue;
- distortion[i]/=area;
+ distortion[j]/=area;
}
distortion[CompositePixelChannel]/=area;
distortion[CompositePixelChannel]/=(double) GetImageChannels(image);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/decorate.c
^
|
@@ -192,12 +192,12 @@
trough;
ssize_t
- x;
+ x_offset,
+ y_offset;
size_t
bevel_width,
- height,
- width;
+ height;
ssize_t
y;
@@ -213,9 +213,10 @@
if ((frame_info->outer_bevel < 0) || (frame_info->inner_bevel < 0))
ThrowImageException(OptionError,"FrameIsLessThanImageSize");
bevel_width=(size_t) (frame_info->outer_bevel+frame_info->inner_bevel);
- x=(ssize_t) frame_info->width-frame_info->x-bevel_width;
- y=(ssize_t) frame_info->height-frame_info->y-bevel_width;
- if ((x < (ssize_t) image->columns) || (y < (ssize_t) image->rows))
+ x_offset=(ssize_t) frame_info->width-frame_info->x-bevel_width;
+ y_offset=(ssize_t) frame_info->height-frame_info->y-bevel_width;
+ if ((x_offset < (ssize_t) image->columns) ||
+ (y_offset < (ssize_t) image->rows))
ThrowImageException(OptionError,"FrameIsLessThanImageSize");
/*
Initialize framed image attributes.
@@ -246,24 +247,24 @@
*/
matte=image->matte_color;
accentuate=matte;
- accentuate.red=(double) (QuantumScale*((QuantumRange-
- AccentuateModulate)*matte.red+(QuantumRange*AccentuateModulate)));
- accentuate.green=(double) (QuantumScale*((QuantumRange-
- AccentuateModulate)*matte.green+(QuantumRange*AccentuateModulate)));
- accentuate.blue=(double) (QuantumScale*((QuantumRange-
- AccentuateModulate)*matte.blue+(QuantumRange*AccentuateModulate)));
- accentuate.black=(double) (QuantumScale*((QuantumRange-
- AccentuateModulate)*matte.black+(QuantumRange*AccentuateModulate)));
+ accentuate.red=(QuantumScale*((QuantumRange-(double) AccentuateModulate)*
+ matte.red+(QuantumRange*(double) AccentuateModulate)));
+ accentuate.green=(QuantumScale*((QuantumRange-(double) AccentuateModulate)*
+ matte.green+(QuantumRange*(double) AccentuateModulate)));
+ accentuate.blue=(QuantumScale*((QuantumRange-(double) AccentuateModulate)*
+ matte.blue+(QuantumRange*(double) AccentuateModulate)));
+ accentuate.black=(QuantumScale*((QuantumRange-(double) AccentuateModulate)*
+ matte.black+(QuantumRange*(double) AccentuateModulate)));
accentuate.alpha=matte.alpha;
highlight=matte;
- highlight.red=(double) (QuantumScale*((QuantumRange-
- HighlightModulate)*matte.red+(QuantumRange*HighlightModulate)));
- highlight.green=(double) (QuantumScale*((QuantumRange-
- HighlightModulate)*matte.green+(QuantumRange*HighlightModulate)));
- highlight.blue=(double) (QuantumScale*((QuantumRange-
- HighlightModulate)*matte.blue+(QuantumRange*HighlightModulate)));
- highlight.black=(double) (QuantumScale*((QuantumRange-
- HighlightModulate)*matte.black+(QuantumRange*HighlightModulate)));
+ highlight.red=(QuantumScale*((QuantumRange-(double) HighlightModulate)*
+ matte.red+(QuantumRange*(double) HighlightModulate)));
+ highlight.green=(QuantumScale*((QuantumRange-(double) HighlightModulate)*
+ matte.green+(QuantumRange*(double) HighlightModulate)));
+ highlight.blue=(QuantumScale*((QuantumRange-(double) HighlightModulate)*
+ matte.blue+(QuantumRange*(double) HighlightModulate)));
+ highlight.black=(QuantumScale*((QuantumRange-(double) HighlightModulate)*
+ matte.black+(QuantumRange*(double) HighlightModulate)));
highlight.alpha=matte.alpha;
shadow=matte;
shadow.red=QuantumScale*matte.red*ShadowModulate;
@@ -285,6 +286,9 @@
frame_info->inner_bevel);
if (height != 0)
{
+ size_t
+ width;
+
ssize_t
x;
@@ -467,6 +471,9 @@
frame_info->y-image->rows-bevel_width+frame_info->outer_bevel);
if (height != 0)
{
+ size_t
+ width;
+
ssize_t
x;
@@ -561,13 +568,13 @@
}
frame_view=DestroyCacheView(frame_view);
image_view=DestroyCacheView(image_view);
- x=(ssize_t) (frame_info->outer_bevel+(frame_info->x-bevel_width)+
+ x_offset=(ssize_t) (frame_info->outer_bevel+(frame_info->x-bevel_width)+
frame_info->inner_bevel);
- y=(ssize_t) (frame_info->outer_bevel+(frame_info->y-bevel_width)+
+ y_offset=(ssize_t) (frame_info->outer_bevel+(frame_info->y-bevel_width)+
frame_info->inner_bevel);
if (status != MagickFalse)
- status=CompositeImage(frame_image,image,compose,MagickTrue,x,y,
- exception);
+ status=CompositeImage(frame_image,image,compose,MagickTrue,x_offset,
+ y_offset,exception);
if (status == MagickFalse)
frame_image=DestroyImage(frame_image);
return(frame_image);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/distort.c
^
|
@@ -2546,10 +2546,10 @@
case PerspectiveDistortion:
{
double
- p,q,r,abs_r,abs_c6,abs_c7,scale;
+ p,n,r,abs_r,abs_c6,abs_c7,scale;
/* perspective is a ratio of affines */
p=coeff[0]*d.x+coeff[1]*d.y+coeff[2];
- q=coeff[3]*d.x+coeff[4]*d.y+coeff[5];
+ n=coeff[3]*d.x+coeff[4]*d.y+coeff[5];
r=coeff[6]*d.x+coeff[7]*d.y+1.0;
/* Pixel Validity -- is it a 'sky' or 'ground' pixel */
validity = (r*coeff[8] < 0.0) ? 0.0 : 1.0;
@@ -2568,14 +2568,14 @@
/* divide by r affine, for perspective scaling */
scale = 1.0/r;
s.x = p*scale;
- s.y = q*scale;
+ s.y = n*scale;
/* Perspective Partial Derivatives or Scaling Vectors */
scale *= scale;
ScaleFilter( resample_filter[id],
(r*coeff[0] - p*coeff[6])*scale,
(r*coeff[1] - p*coeff[7])*scale,
- (r*coeff[3] - q*coeff[6])*scale,
- (r*coeff[4] - q*coeff[7])*scale );
+ (r*coeff[3] - n*coeff[6])*scale,
+ (r*coeff[4] - n*coeff[7])*scale );
}
break;
}
@@ -2824,21 +2824,22 @@
Note: We can not determine derivatives using shepards method
so only a point sample interpolatation can be used.
*/
- size_t
- i;
double
denominator;
+ size_t
+ k;
+
denominator = s.x = s.y = 0;
- for(i=0; i<number_arguments; i+=4) {
+ for(k=0; k<number_arguments; k+=4) {
double weight =
- ((double)d.x-arguments[i+2])*((double)d.x-arguments[i+2])
- + ((double)d.y-arguments[i+3])*((double)d.y-arguments[i+3]);
+ ((double)d.x-arguments[k+2])*((double)d.x-arguments[k+2])
+ + ((double)d.y-arguments[k+3])*((double)d.y-arguments[k+3]);
weight = pow(weight,coeff[0]); /* shepards power factor */
weight = ( weight < 1.0 ) ? 1.0 : 1.0/weight;
- s.x += (arguments[ i ]-arguments[i+2])*weight;
- s.y += (arguments[i+1]-arguments[i+3])*weight;
+ s.x += (arguments[ k ]-arguments[k+2])*weight;
+ s.y += (arguments[k+1]-arguments[k+3])*weight;
denominator += weight;
}
s.x /= denominator;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/draw.c
^
|
@@ -3457,33 +3457,33 @@
name[MagickPathExtent];
RectangleInfo
- bounds;
+ region;
(void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
(void) GetNextToken(q,&q,extent,token);
- bounds.x=CastDoubleToLong(ceil(GetDrawValue(token,
+ region.x=CastDoubleToLong(ceil(GetDrawValue(token,
&next_token)-0.5));
if (token == next_token)
ThrowPointExpectedException(token,exception);
(void) GetNextToken(q,&q,extent,token);
if (*token == ',')
(void) GetNextToken(q,&q,extent,token);
- bounds.y=CastDoubleToLong(ceil(GetDrawValue(token,
+ region.y=CastDoubleToLong(ceil(GetDrawValue(token,
&next_token)-0.5));
if (token == next_token)
ThrowPointExpectedException(token,exception);
(void) GetNextToken(q,&q,extent,token);
if (*token == ',')
(void) GetNextToken(q,&q,extent,token);
- bounds.width=(size_t) CastDoubleToLong(floor(GetDrawValue(
+ region.width=(size_t) CastDoubleToLong(floor(GetDrawValue(
token,&next_token)+0.5));
if (token == next_token)
ThrowPointExpectedException(token,exception);
(void) GetNextToken(q,&q,extent,token);
if (*token == ',')
(void) GetNextToken(q,&q,extent,token);
- bounds.height=(size_t) floor(GetDrawValue(token,&next_token)+
+ region.height=(size_t) floor(GetDrawValue(token,&next_token)+
0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3509,8 +3509,8 @@
(void) FormatLocaleString(key,MagickPathExtent,"%s-geometry",
name);
(void) FormatLocaleString(geometry,MagickPathExtent,
- "%.20gx%.20g%+.20g%+.20g",(double) bounds.width,(double)
- bounds.height,(double) bounds.x,(double) bounds.y);
+ "%.20gx%.20g%+.20g%+.20g",(double) region.width,(double)
+ region.height,(double) region.x,(double) region.y);
(void) SetImageArtifact(image,key,geometry);
(void) GetNextToken(q,&q,extent,token);
break;
@@ -4323,9 +4323,6 @@
}
case TextPrimitive:
{
- char
- geometry[MagickPathExtent];
-
if (primitive_info[j].coordinates != 1)
{
status=MagickFalse;
@@ -4349,8 +4346,6 @@
mvg_info.point=primitive_info->point;
cursor=0.0;
}
- (void) FormatLocaleString(geometry,MagickPathExtent,"%+f%+f",
- primitive_info->point.x,primitive_info->point.y);
clone_info->render=MagickFalse;
clone_info->text=AcquireString(token);
status&=GetTypeMetrics(image,clone_info,&metrics,exception);
@@ -5680,8 +5675,8 @@
(draw_info->stroke_pattern != (Image *) NULL)))
{
double
- x,
- y;
+ point_x,
+ point_y;
MagickBooleanType
closed_path;
@@ -5691,9 +5686,9 @@
*/
closed_path=primitive_info[0].closed_subpath;
i=(ssize_t) primitive_info[0].coordinates;
- x=fabs(primitive_info[i-1].point.x-primitive_info[0].point.x);
- y=fabs(primitive_info[i-1].point.y-primitive_info[0].point.y);
- if ((x < MagickEpsilon) && (y < MagickEpsilon))
+ point_x=fabs(primitive_info[i-1].point.x-primitive_info[0].point.x);
+ point_y=fabs(primitive_info[i-1].point.y-primitive_info[0].point.y);
+ if ((point_x < MagickEpsilon) && (point_y < MagickEpsilon))
closed_path=MagickTrue;
if ((((draw_info->linecap == RoundCap) ||
(closed_path != MagickFalse)) &&
@@ -7470,7 +7465,9 @@
box_q[3].y)/(slope.p-slope.q));
box_q[4].y=(double) (slope.p*(box_q[4].x-box_q[0].x)+box_q[0].y);
}
+ DisableMSCWarning(4127)
CheckPathExtent(MaxStrokePad,MaxStrokePad);
+ RestoreMSCWarning
dot_product=dx.q*dy.p-dx.p*dy.q;
if (dot_product <= 0.0)
switch (draw_info->linejoin)
@@ -7526,7 +7523,9 @@
theta.q+=2.0*MagickPI;
arc_segments=(size_t) CastDoubleToLong(ceil((double) ((theta.
q-theta.p)/(2.0*sqrt(PerceptibleReciprocal(mid))))));
+ DisableMSCWarning(4127)
CheckPathExtent(MaxStrokePad,arc_segments+MaxStrokePad);
+ RestoreMSCWarning
stroke_q[q].x=box_q[1].x;
stroke_q[q].y=box_q[1].y;
q++;
@@ -7599,7 +7598,9 @@
theta.p+=2.0*MagickPI;
arc_segments=(size_t) CastDoubleToLong(ceil((double) ((theta.p-
theta.q)/(2.0*sqrt((double) (PerceptibleReciprocal(mid)))))));
+ DisableMSCWarning(4127)
CheckPathExtent(arc_segments+MaxStrokePad,MaxStrokePad);
+ RestoreMSCWarning
stroke_p[p++]=box_p[1];
for (j=1; j < (ssize_t) arc_segments; j++)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/effect.c
^
|
@@ -152,17 +152,11 @@
MagickOffsetType
progress;
- ssize_t
- i;
-
size_t
width;
ssize_t
- j,
- k,
- u,
- v,
+ w,
y;
assert(image != (const Image *) NULL);
@@ -211,33 +205,39 @@
ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
}
(void) memset(kernel,0,(size_t) width*sizeof(*kernel));
- for (i=0; i < (ssize_t) width; i+=2)
+ for (w=0; w < (ssize_t) width; w+=2)
{
- kernel[i]=(double *) MagickAssumeAligned(AcquireAlignedMemory(
- (size_t) (width-i),(width-i)*sizeof(**kernel)));
- if (kernel[i] == (double *) NULL)
+ ssize_t
+ j,
+ k,
+ u,
+ v;
+
+ kernel[w]=(double *) MagickAssumeAligned(AcquireAlignedMemory(
+ (size_t) (width-w),(width-w)*sizeof(**kernel)));
+ if (kernel[w] == (double *) NULL)
break;
normalize=0.0;
- j=(ssize_t) (width-i-1)/2;
+ j=(ssize_t) (width-w-1)/2;
k=0;
for (v=(-j); v <= j; v++)
{
for (u=(-j); u <= j; u++)
{
- kernel[i][k]=(double) (exp(-((double) u*u+v*v)/(2.0*MagickSigma*
+ kernel[w][k]=(double) (exp(-((double) u*u+v*v)/(2.0*MagickSigma*
MagickSigma))/(2.0*MagickPI*MagickSigma*MagickSigma));
- normalize+=kernel[i][k];
+ normalize+=kernel[w][k];
k++;
}
}
- kernel[i][(k-1)/2]+=(double) (1.0-normalize);
+ kernel[w][(k-1)/2]+=(double) (1.0-normalize);
if (sigma < MagickEpsilon)
- kernel[i][(k-1)/2]=1.0;
+ kernel[w][(k-1)/2]=1.0;
}
- if (i < (ssize_t) width)
+ if (w < (ssize_t) width)
{
- for (i-=2; i >= 0; i-=2)
- kernel[i]=(double *) RelinquishAlignedMemory(kernel[i]);
+ for (w-=2; w >= 0; w-=2)
+ kernel[w]=(double *) RelinquishAlignedMemory(kernel[w]);
kernel=(double **) RelinquishAlignedMemory(kernel);
edge_image=DestroyImage(edge_image);
blur_image=DestroyImage(blur_image);
@@ -405,8 +405,8 @@
edge_view=DestroyCacheView(edge_view);
image_view=DestroyCacheView(image_view);
edge_image=DestroyImage(edge_image);
- for (i=0; i < (ssize_t) width; i+=2)
- kernel[i]=(double *) RelinquishAlignedMemory(kernel[i]);
+ for (w=0; w < (ssize_t) width; w+=2)
+ kernel[w]=(double *) RelinquishAlignedMemory(kernel[w]);
kernel=(double **) RelinquishAlignedMemory(kernel);
if (status == MagickFalse)
blur_image=DestroyImage(blur_image);
@@ -473,17 +473,11 @@
MagickOffsetType
progress;
- ssize_t
- i;
-
size_t
width;
ssize_t
- j,
- k,
- u,
- v,
+ w,
y;
assert(image != (const Image *) NULL);
@@ -532,33 +526,39 @@
ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
}
(void) memset(kernel,0,(size_t) width*sizeof(*kernel));
- for (i=0; i < (ssize_t) width; i+=2)
+ for (w=0; w < (ssize_t) width; w+=2)
{
- kernel[i]=(double *) MagickAssumeAligned(AcquireAlignedMemory((size_t)
- (width-i),(width-i)*sizeof(**kernel)));
- if (kernel[i] == (double *) NULL)
+ ssize_t
+ j,
+ k,
+ u,
+ v;
+
+ kernel[w]=(double *) MagickAssumeAligned(AcquireAlignedMemory((size_t)
+ (width-w),(width-w)*sizeof(**kernel)));
+ if (kernel[w] == (double *) NULL)
break;
normalize=0.0;
- j=(ssize_t) (width-i-1)/2;
+ j=(ssize_t) (width-w-1)/2;
k=0;
for (v=(-j); v <= j; v++)
{
for (u=(-j); u <= j; u++)
{
- kernel[i][k]=(double) (-exp(-((double) u*u+v*v)/(2.0*MagickSigma*
+ kernel[w][k]=(double) (-exp(-((double) u*u+v*v)/(2.0*MagickSigma*
MagickSigma))/(2.0*MagickPI*MagickSigma*MagickSigma));
- normalize+=kernel[i][k];
+ normalize+=kernel[w][k];
k++;
}
}
- kernel[i][(k-1)/2]=(double) ((-2.0)*normalize);
+ kernel[w][(k-1)/2]=(double) ((-2.0)*normalize);
if (sigma < MagickEpsilon)
- kernel[i][(k-1)/2]=1.0;
+ kernel[w][(k-1)/2]=1.0;
}
- if (i < (ssize_t) width)
+ if (w < (ssize_t) width)
{
- for (i-=2; i >= 0; i-=2)
- kernel[i]=(double *) RelinquishAlignedMemory(kernel[i]);
+ for (w-=2; w >= 0; w-=2)
+ kernel[w]=(double *) RelinquishAlignedMemory(kernel[w]);
kernel=(double **) RelinquishAlignedMemory(kernel);
edge_image=DestroyImage(edge_image);
sharp_image=DestroyImage(sharp_image);
@@ -726,8 +726,8 @@
edge_view=DestroyCacheView(edge_view);
image_view=DestroyCacheView(image_view);
edge_image=DestroyImage(edge_image);
- for (i=0; i < (ssize_t) width; i+=2)
- kernel[i]=(double *) RelinquishAlignedMemory(kernel[i]);
+ for (w=0; w < (ssize_t) width; w+=2)
+ kernel[w]=(double *) RelinquishAlignedMemory(kernel[w]);
kernel=(double **) RelinquishAlignedMemory(kernel);
if (status == MagickFalse)
sharp_image=DestroyImage(sharp_image);
@@ -925,15 +925,8 @@
mid;
ssize_t
- u;
-
- ssize_t
- n,
number_threads,
- v;
-
- ssize_t
- i,
+ w,
y;
assert(image != (const Image *) NULL);
@@ -957,16 +950,27 @@
blur_image=DestroyImage(blur_image);
ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
}
- for (i=(-MaxIntensity); i < MaxIntensity; i++)
- intensity_gaussian[i+MaxIntensity]=BlurGaussian((double) i,intensity_sigma);
+ for (w=(-MaxIntensity); w < MaxIntensity; w++)
+ intensity_gaussian[w+MaxIntensity]=BlurGaussian((double) w,intensity_sigma);
spatial_gaussian=weights[number_threads];
- n=0;
- mid.x=(ssize_t) (width/2L);
- mid.y=(ssize_t) (height/2L);
- for (v=0; v < (ssize_t) height; v++)
- for (u=0; u < (ssize_t) width; u++)
- spatial_gaussian[n++]=BlurGaussian(BlurDistance(0,0,u-mid.x,v-mid.y),
- spatial_sigma);
+ {
+ ssize_t
+ n,
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/exception-private.h
^
|
@@ -28,8 +28,8 @@
#define ThrowBinaryException(severity,tag,context) \
{ \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s'",context); \
+ (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ "`%s'",context); \
return(MagickFalse); \
}
#define ThrowFatalException(severity,tag) \
@@ -42,8 +42,8 @@
\
fatal_exception=AcquireExceptionInfo(); \
fatal_message=GetExceptionMessage(errno); \
- (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s'",fatal_message); \
+ (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \
+ "`%s'",fatal_message); \
fatal_message=DestroyString(fatal_message); \
CatchException(fatal_exception); \
(void) DestroyExceptionInfo(fatal_exception); \
@@ -56,21 +56,20 @@
*file_message; \
\
file_message=GetExceptionMessage(errno); \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"'%s': %s",context, \
- file_message); \
+ (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ "'%s': %s",context,file_message); \
file_message=DestroyString(file_message); \
}
#define ThrowImageException(severity,tag) \
{ \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s'",image->filename); \
+ (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ "`%s'",image->filename); \
return((Image *) NULL); \
}
#define ThrowReaderException(severity,tag) \
{ \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s'",image_info->filename); \
+ (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ "`%s'",image_info->filename); \
if ((image) != (Image *) NULL) \
{ \
(void) CloseBlob(image); \
@@ -80,8 +79,8 @@
}
#define ThrowWriterException(severity,tag) \
{ \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"`%s'",image->filename); \
+ (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ "`%s'",image->filename); \
if (image_info->adjoin != MagickFalse) \
while (image->previous != (Image *) NULL) \
image=image->previous; \
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/fx.c
^
|
@@ -756,9 +756,6 @@
}
else
{
- MagickBooleanType
- status;
-
status=QueryColorCompliance(name,AllCompliance,&pixel,
fx_info->exception);
if (status != MagickFalse)
@@ -2238,9 +2235,6 @@
}
if (IsFxFunction(expression,"for",3) != MagickFalse)
{
- double
- sans = 0.0;
-
size_t
length;
@@ -2321,9 +2315,6 @@
{
if (IsFxFunction(expression,"if",2) != MagickFalse)
{
- double
- sans = 0.0;
-
size_t
length;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/histogram.c
^
|
@@ -648,8 +648,8 @@
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% IdentifyPaletteImage() returns MagickTrue if the image has 256 unique colors
-% or less.
+% IdentifyPaletteImage() returns MagickTrue if the image does not have more
+% unique colors than specified in max_colors.
%
% The format of the IdentifyPaletteImage method is:
%
@@ -660,34 +660,30 @@
%
% o image: the image.
%
+% o max_colors: the maximum unique colors.
+%
% o exception: return any errors or warnings in this structure.
%
*/
static MagickBooleanType CheckImageColors(const Image *image,
- ExceptionInfo *exception,size_t max_colors)
+ const size_t max_colors,ExceptionInfo *exception)
{
CacheView
*image_view;
- CubeInfo
- *cube_info;
-
- PixelInfo
- pixel,
- target;
-
const Quantum
*p;
- ssize_t
- x;
+ CubeInfo
+ *cube_info;
NodeInfo
*node_info;
- ssize_t
- i;
+ PixelInfo
+ pixel,
+ target;
size_t
id,
@@ -695,6 +691,7 @@
level;
ssize_t
+ i,
y;
if (image->storage_class == PseudoClass)
@@ -714,6 +711,9 @@
image_view=AcquireVirtualCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
+ ssize_t
+ x;
+
p=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception);
if (p == (const Quantum *) NULL)
break;
@@ -800,7 +800,7 @@
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- return(CheckImageColors(image,exception,256));
+ return(CheckImageColors(image,256,exception));
}

/*
@@ -838,7 +838,7 @@
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- return(CheckImageColors(image,exception,MaximumUniqueColors));
+ return(CheckImageColors(image,MaximumUniqueColors,exception));
}

/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/locale.c
^
|
@@ -965,7 +965,7 @@
%
*/
MagickExport double InterpretLocaleValue(const char *magick_restrict string,
- char **magick_restrict sentinal)
+ char *magick_restrict *sentinal)
{
char
*q;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/locale_.h
^
|
@@ -49,7 +49,7 @@
**GetLocaleInfoList(const char *,size_t *,ExceptionInfo *);
extern MagickExport double
- InterpretLocaleValue(const char *magick_restrict,char **magick_restrict);
+ InterpretLocaleValue(const char *magick_restrict,char *magick_restrict *);
extern MagickExport int
LocaleCompare(const char *,const char *) magick_attribute((__pure__)),
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/memory.c
^
|
@@ -1050,7 +1050,7 @@
char
*value;
- max_memory_request=(size_t) MagickULLConstant(~0);
+ max_memory_request=MAGICK_SSIZE_MAX;
value=GetPolicyValue("system:max-memory-request");
if (value != (char *) NULL)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/module.c
^
|
@@ -1633,6 +1633,8 @@
MagickExport MagickBooleanType ListModuleInfo(FILE *magick_unused(file),
ExceptionInfo *magick_unused(exception))
{
+ magick_unreferenced(file);
+ magick_unreferenced(exception);
return(MagickTrue);
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/morphology.c
^
|
@@ -969,8 +969,9 @@
switch(type) {
case UndefinedKernel: /* These should not call this function */
case UserDefinedKernel:
- assert("Should not call this function" != (char *) NULL);
- break;
+ ThrowMagickException(exception,GetMagickModule(),OptionWarning,
+ "InvalidOption","`%s'","Should not call this function");
+ return((KernelInfo *) NULL);
case LaplacianKernel: /* Named Descrete Convolution Kernels */
case SobelKernel: /* these are defined using other kernels */
case RobertsKernel:
@@ -2628,7 +2629,8 @@
}
default:
{
- assert("Not a Primitive Morphology Method" != (char *) NULL);
+ ThrowMagickException(exception,GetMagickModule(),OptionWarning,
+ "InvalidOption","`%s'","Not a Primitive Morphology Method");
break;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/nt-feature.c
^
|
@@ -42,9 +42,6 @@
*/
#include "MagickCore/studio.h"
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__)
-#define WIN32_LEAN_AND_MEAN
-#define VC_EXTRALEAN
-#include <windows.h>
#include "MagickCore/cache.h"
#include "MagickCore/colorspace.h"
#include "MagickCore/colorspace-private.h"
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/opencl.c
^
|
@@ -2308,9 +2308,6 @@
number_devices,
number_platforms;
- size_t
- length;
-
number_platforms=0;
if (openCL_library->clGetPlatformIDs(0,NULL,&number_platforms) != CL_SUCCESS)
return;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/pixel-accessor.h
^
|
@@ -299,10 +299,10 @@
MagickRealType
intensity;
- intensity=(MagickRealType) (
- 0.212656f*pixel[image->channel_map[RedPixelChannel].offset]+
- 0.715158f*pixel[image->channel_map[GreenPixelChannel].offset]+
- 0.072186f*pixel[image->channel_map[BluePixelChannel].offset]);
+ intensity=
+ 0.212656f*(MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]+
+ 0.715158f*(MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]+
+ 0.072186f*(MagickRealType) pixel[image->channel_map[BluePixelChannel].offset];
return(intensity);
}
@@ -314,10 +314,10 @@
if (image->colorspace != sRGBColorspace)
{
- intensity=(MagickRealType) (
- 0.212656f*pixel[image->channel_map[RedPixelChannel].offset]+
- 0.715158f*pixel[image->channel_map[GreenPixelChannel].offset]+
- 0.072186f*pixel[image->channel_map[BluePixelChannel].offset]);
+ intensity=
+ 0.212656f*(MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]+
+ 0.715158f*(MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]+
+ 0.072186f*(MagickRealType) pixel[image->channel_map[BluePixelChannel].offset];
return(intensity);
}
intensity=(MagickRealType) (0.212656f*DecodePixelGamma((MagickRealType)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/quantize.c
^
|
@@ -2495,7 +2495,6 @@
*quantize_info;
size_t
- colors,
depth;
/*
@@ -2505,9 +2504,9 @@
quantize_info->colorspace=image->colorspace;
quantize_info->number_colors=number_colors;
quantize_info->dither_method=NoDitherMethod;
- colors=number_colors;
- for (depth=1; colors != 0; depth++)
- colors>>=2;
+ n=number_colors;
+ for (depth=1; n != 0; depth++)
+ n>>=2;
cube_info=GetCubeInfo(quantize_info,depth,number_colors);
if (cube_info == (CubeInfo *) NULL)
{
@@ -2601,13 +2600,11 @@
distortion;
ssize_t
- i;
-
- ssize_t
+ j,
y;
- for (i=0; i < (ssize_t) number_threads; i++)
- (void) memset(kmeans_pixels[i],0,image->colors*sizeof(*kmeans_pixels[i]));
+ for (j=0; j < (ssize_t) number_threads; j++)
+ (void) memset(kmeans_pixels[j],0,image->colors*sizeof(*kmeans_pixels[j]));
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(dynamic) shared(status) \
magick_number_threads(image,image,image->rows,1)
@@ -2637,15 +2634,13 @@
min_distance;
ssize_t
- i;
-
- ssize_t
- j;
+ i,
+ k;
/*
Assign each pixel whose mean has the least squared color distance.
*/
- j=0;
+ k=0;
min_distance=KmeansMetric(image,q,image->colormap+0);
for (i=1; i < (ssize_t) image->colors; i++)
{
@@ -2658,19 +2653,19 @@
if (distance < min_distance)
{
min_distance=distance;
- j=i;
+ k=i;
}
}
- kmeans_pixels[id][j].red+=QuantumScale*GetPixelRed(image,q);
- kmeans_pixels[id][j].green+=QuantumScale*GetPixelGreen(image,q);
- kmeans_pixels[id][j].blue+=QuantumScale*GetPixelBlue(image,q);
+ kmeans_pixels[id][k].red+=QuantumScale*GetPixelRed(image,q);
+ kmeans_pixels[id][k].green+=QuantumScale*GetPixelGreen(image,q);
+ kmeans_pixels[id][k].blue+=QuantumScale*GetPixelBlue(image,q);
if (image->alpha_trait != UndefinedPixelTrait)
- kmeans_pixels[id][j].alpha+=QuantumScale*GetPixelAlpha(image,q);
+ kmeans_pixels[id][k].alpha+=QuantumScale*GetPixelAlpha(image,q);
if (image->colorspace == CMYKColorspace)
- kmeans_pixels[id][j].black+=QuantumScale*GetPixelBlack(image,q);
- kmeans_pixels[id][j].count++;
- kmeans_pixels[id][j].distortion+=min_distance;
- SetPixelIndex(image,(Quantum) j,q);
+ kmeans_pixels[id][k].black+=QuantumScale*GetPixelBlack(image,q);
+ kmeans_pixels[id][k].count++;
+ kmeans_pixels[id][k].distortion+=min_distance;
+ SetPixelIndex(image,(Quantum) k,q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
@@ -2681,42 +2676,42 @@
/*
Reduce sums to [0] entry.
*/
- for (i=1; i < (ssize_t) number_threads; i++)
+ for (j=1; j < (ssize_t) number_threads; j++)
{
ssize_t
- j;
+ k;
- for (j=0; j < (ssize_t) image->colors; j++)
+ for (k=0; k < (ssize_t) image->colors; k++)
{
- kmeans_pixels[0][j].red+=kmeans_pixels[i][j].red;
- kmeans_pixels[0][j].green+=kmeans_pixels[i][j].green;
- kmeans_pixels[0][j].blue+=kmeans_pixels[i][j].blue;
+ kmeans_pixels[0][k].red+=kmeans_pixels[j][k].red;
+ kmeans_pixels[0][k].green+=kmeans_pixels[j][k].green;
+ kmeans_pixels[0][k].blue+=kmeans_pixels[j][k].blue;
if (image->alpha_trait != UndefinedPixelTrait)
- kmeans_pixels[0][j].alpha+=kmeans_pixels[i][j].alpha;
+ kmeans_pixels[0][k].alpha+=kmeans_pixels[j][k].alpha;
if (image->colorspace == CMYKColorspace)
- kmeans_pixels[0][j].black+=kmeans_pixels[i][j].black;
- kmeans_pixels[0][j].count+=kmeans_pixels[i][j].count;
- kmeans_pixels[0][j].distortion+=kmeans_pixels[i][j].distortion;
+ kmeans_pixels[0][k].black+=kmeans_pixels[j][k].black;
+ kmeans_pixels[0][k].count+=kmeans_pixels[j][k].count;
+ kmeans_pixels[0][k].distortion+=kmeans_pixels[j][k].distortion;
}
}
/*
Calculate the new means (centroids) of the pixels in the new clusters.
*/
distortion=0.0;
- for (i=0; i < (ssize_t) image->colors; i++)
+ for (j=0; j < (ssize_t) image->colors; j++)
{
double
gamma;
- gamma=PerceptibleReciprocal((double) kmeans_pixels[0][i].count);
- image->colormap[i].red=gamma*QuantumRange*kmeans_pixels[0][i].red;
- image->colormap[i].green=gamma*QuantumRange*kmeans_pixels[0][i].green;
- image->colormap[i].blue=gamma*QuantumRange*kmeans_pixels[0][i].blue;
+ gamma=PerceptibleReciprocal((double) kmeans_pixels[0][j].count);
+ image->colormap[j].red=gamma*QuantumRange*kmeans_pixels[0][j].red;
+ image->colormap[j].green=gamma*QuantumRange*kmeans_pixels[0][j].green;
+ image->colormap[j].blue=gamma*QuantumRange*kmeans_pixels[0][j].blue;
if (image->alpha_trait != UndefinedPixelTrait)
- image->colormap[i].alpha=gamma*QuantumRange*kmeans_pixels[0][i].alpha;
+ image->colormap[j].alpha=gamma*QuantumRange*kmeans_pixels[0][j].alpha;
if (image->colorspace == CMYKColorspace)
- image->colormap[i].black=gamma*QuantumRange*kmeans_pixels[0][i].black;
- distortion+=kmeans_pixels[0][i].distortion;
+ image->colormap[j].black=gamma*QuantumRange*kmeans_pixels[0][j].black;
+ distortion+=kmeans_pixels[0][j].distortion;
}
if (verbose != MagickFalse)
(void) FormatLocaleFile(stderr,"distortion[%.20g]: %*g %*g\n",(double) n,
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/quantum-export.c
^
|
@@ -240,7 +240,7 @@
static void ExportAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -248,9 +248,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- (void) exception;
switch (quantum_info->depth)
{
case 8:
@@ -346,7 +343,7 @@
static void ExportBGRQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -357,9 +354,6 @@
ssize_t
bit;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- (void) exception;
switch (quantum_info->depth)
{
case 8:
@@ -646,7 +640,7 @@
static void ExportBGRAQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -654,8 +648,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
switch (quantum_info->depth)
{
case 8:
@@ -890,7 +882,7 @@
static void ExportBGROQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -898,8 +890,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
switch (quantum_info->depth)
{
case 8:
@@ -1142,6 +1132,8 @@
ssize_t
x;
+ assert(exception != (ExceptionInfo *) NULL);
+ assert(exception->signature == MagickCoreSignature);
if (image->colorspace != CMYKColorspace)
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
@@ -1243,7 +1235,7 @@
static void ExportBlueQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -1251,8 +1243,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
switch (quantum_info->depth)
{
case 8:
@@ -1348,7 +1338,7 @@
static void ExportCbYCrYQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
Quantum
cbcr[4];
@@ -1366,8 +1356,6 @@
ssize_t
n;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
n=0;
quantum=0;
switch (quantum_info->depth)
@@ -1468,6 +1456,8 @@
ssize_t
x;
+ assert(exception != (ExceptionInfo *) NULL);
+ assert(exception->signature == MagickCoreSignature);
if (image->colorspace != CMYKColorspace)
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
@@ -1613,6 +1603,8 @@
ssize_t
x;
+ assert(exception != (ExceptionInfo *) NULL);
+ assert(exception->signature == MagickCoreSignature);
if (image->colorspace != CMYKColorspace)
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
@@ -1778,6 +1770,8 @@
ssize_t
x;
+ assert(exception != (ExceptionInfo *) NULL);
+ assert(exception->signature == MagickCoreSignature);
if (image->colorspace != CMYKColorspace)
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
@@ -1938,7 +1932,7 @@
static void ExportGrayQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -1946,8 +1940,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
switch (quantum_info->depth)
{
case 1:
@@ -2196,7 +2188,7 @@
static void ExportGrayAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -2204,8 +2196,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
switch (quantum_info->depth)
{
case 1:
@@ -2402,7 +2392,7 @@
static void ExportGreenQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
- unsigned char *magick_restrict q,ExceptionInfo *exception)
+ unsigned char *magick_restrict q)
{
QuantumAny
range;
@@ -2410,8 +2400,6 @@
ssize_t
x;
- assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
switch (quantum_info->depth)
{
case 8:
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/random.c
^
|
@@ -413,7 +413,7 @@
if (gettimeofday(&timer,(struct timezone *) NULL) == 0)
{
seconds=(size_t) timer.tv_sec;
- nanoseconds=(size_t) (1000UL*timer.tv_usec);
+ nanoseconds=((size_t) 1000UL*timer.tv_usec);
}
}
#endif
@@ -454,22 +454,22 @@
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
{
double
- seconds;
+ nt_seconds;
LARGE_INTEGER
- nanoseconds;
+ nt_nanoseconds;
/*
Not crytographically strong but better than nothing.
*/
- seconds=NTElapsedTime()+NTUserTime();
- SetStringInfoLength(chaos,sizeof(seconds));
- SetStringInfoDatum(chaos,(unsigned char *) &seconds);
+ nt_seconds=NTElapsedTime()+NTUserTime();
+ SetStringInfoLength(chaos,sizeof(nt_seconds));
+ SetStringInfoDatum(chaos,(unsigned char *) &nt_seconds);
ConcatenateStringInfo(entropy,chaos);
- if (QueryPerformanceCounter(&nanoseconds) != 0)
+ if (QueryPerformanceCounter(&nt_nanoseconds) != 0)
{
- SetStringInfoLength(chaos,sizeof(nanoseconds));
- SetStringInfoDatum(chaos,(unsigned char *) &nanoseconds);
+ SetStringInfoLength(chaos,sizeof(nt_nanoseconds));
+ SetStringInfoDatum(chaos,(unsigned char *) &nt_nanoseconds);
ConcatenateStringInfo(entropy,chaos);
}
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/resize.c
^
|
@@ -2401,14 +2401,14 @@
{ \
if (intensities[B] > intensities[A]) \
{ \
- ssize_t \
+ const ssize_t \
offsets[3] = { B, C, D }; \
\
MixPixels(pixels,offsets,3,result,3,channels); \
} \
else \
{ \
- ssize_t \
+ const ssize_t \
offsets[3] = { A, B, C }; \
\
MixPixels(pixels,offsets,3,result,3,channels); \
@@ -2423,6 +2423,9 @@
Mix2Pixels(pixels,A,B,result,3,channels); \
}
+ const ssize_t
+ pixels_offsets[4] = { 0, 1, 3, 4 };
+
MagickFloatType
intensities[9];
@@ -2437,9 +2440,6 @@
ssize_t
i;
- ssize_t
- offsets[4] = { 0, 1, 3, 4 };
-
for (i=0; i < 9; i++)
intensities[i]=GetPixelIntensity(source,pixels + i*channels);
CopyPixels(pixels,0,result,0,channels);
@@ -2508,7 +2508,7 @@
Line(1,4,0,3)
return;
}
- MixPixels(pixels,offsets,4,result,3,channels);
+ MixPixels(pixels,pixels_offsets,4,result,3,channels);
#undef Corner
#undef Line
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/segment.c
^
|
@@ -550,7 +550,7 @@
for (y=0; y < (ssize_t) image->rows; y++)
{
Cluster
- *cluster;
+ *c;
const PixelInfo
*magick_restrict p;
@@ -578,23 +578,23 @@
pixel.red=(double) ScaleQuantumToChar(GetPixelRed(image,q));
pixel.green=(double) ScaleQuantumToChar(GetPixelGreen(image,q));
pixel.blue=(double) ScaleQuantumToChar(GetPixelBlue(image,q));
- for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
+ for (c=head; c != (Cluster *) NULL; c=c->next)
{
- if ((pixel.red >= (double) (cluster->red.left-SafeMargin)) &&
- (pixel.red <= (double) (cluster->red.right+SafeMargin)) &&
- (pixel.green >= (double) (cluster->green.left-SafeMargin)) &&
- (pixel.green <= (double) (cluster->green.right+SafeMargin)) &&
- (pixel.blue >= (double) (cluster->blue.left-SafeMargin)) &&
- (pixel.blue <= (double) (cluster->blue.right+SafeMargin)))
+ if ((pixel.red >= (double) (c->red.left-SafeMargin)) &&
+ (pixel.red <= (double) (c->red.right+SafeMargin)) &&
+ (pixel.green >= (double) (c->green.left-SafeMargin)) &&
+ (pixel.green <= (double) (c->green.right+SafeMargin)) &&
+ (pixel.blue >= (double) (c->blue.left-SafeMargin)) &&
+ (pixel.blue <= (double) (c->blue.right+SafeMargin)))
{
/*
Classify this pixel.
*/
- SetPixelIndex(image,(Quantum) cluster->id,q);
+ SetPixelIndex(image,(Quantum) c->id,q);
break;
}
}
- if (cluster == (Cluster *) NULL)
+ if (c == (Cluster *) NULL)
{
double
distance_squared,
@@ -1084,27 +1084,29 @@
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- PixelInfo
- pixel;
-
- pixel.red=(double) ScaleQuantumToChar(GetPixelRed(image,p));
- pixel.green=(double) ScaleQuantumToChar(GetPixelGreen(image,p));
- pixel.blue=(double) ScaleQuantumToChar(GetPixelBlue(image,p));
+ double
+ b,
+ g,
+ r;
+
+ r=(double) ScaleQuantumToChar(GetPixelRed(image,p));
+ g=(double) ScaleQuantumToChar(GetPixelGreen(image,p));
+ b=(double) ScaleQuantumToChar(GetPixelBlue(image,p));
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
- if ((pixel.red >= (double) (cluster->red.left-SafeMargin)) &&
- (pixel.red <= (double) (cluster->red.right+SafeMargin)) &&
- (pixel.green >= (double) (cluster->green.left-SafeMargin)) &&
- (pixel.green <= (double) (cluster->green.right+SafeMargin)) &&
- (pixel.blue >= (double) (cluster->blue.left-SafeMargin)) &&
- (pixel.blue <= (double) (cluster->blue.right+SafeMargin)))
+ if ((r >= (double) (cluster->red.left-SafeMargin)) &&
+ (r <= (double) (cluster->red.right+SafeMargin)) &&
+ (g >= (double) (cluster->green.left-SafeMargin)) &&
+ (g <= (double) (cluster->green.right+SafeMargin)) &&
+ (b >= (double) (cluster->blue.left-SafeMargin)) &&
+ (b <= (double) (cluster->blue.right+SafeMargin)))
{
/*
Count this pixel.
*/
count++;
- cluster->red.center+=pixel.red;
- cluster->green.center+=pixel.green;
- cluster->blue.center+=pixel.blue;
+ cluster->red.center+=r;
+ cluster->green.center+=g;
+ cluster->blue.center+=b;
cluster->count++;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/shear.c
^
|
@@ -292,6 +292,8 @@
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) \
magick_number_threads(image,image,GetMatrixColumns(p),1)
+#else
+ magick_unreferenced(image);
#endif
for (x=0; x < (ssize_t) GetMatrixColumns(p); x++)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/statistic.c
^
|
@@ -481,7 +481,7 @@
**image_view;
const Image
- *next;
+ *view;
Image
*image;
@@ -502,7 +502,7 @@
number_images;
ssize_t
- j,
+ n,
y;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
@@ -543,11 +543,11 @@
ResourceLimitError,"MemoryAllocationFailed","`%s'",images->filename);
return(image);
}
- next=images;
- for (j=0; j < (ssize_t) number_images; j++)
+ view=images;
+ for (n=0; n < (ssize_t) number_images; n++)
{
- image_view[j]=AcquireVirtualCacheView(next,exception);
- next=GetNextImageInList(next);
+ image_view[n]=AcquireVirtualCacheView(view,exception);
+ view=GetNextImageInList(view);
}
/*
Evaluate image pixels.
@@ -565,9 +565,6 @@
#endif
for (y=0; y < (ssize_t) image->rows; y++)
{
- const Image
- *next;
-
const int
id = GetOpenMPThreadId();
@@ -614,6 +611,9 @@
evaluate_pixel=evaluate_pixels[id];
for (x=0; x < (ssize_t) image->columns; x++)
{
+ const Image
+ *next;
+
ssize_t
i;
@@ -688,10 +688,6 @@
const Quantum
**p;
- ssize_t
- i,
- x;
-
PixelChannels
*evaluate_pixel;
@@ -699,6 +695,10 @@
*magick_restrict q;
ssize_t
+ i,
+ x;
+
+ ssize_t
j;
if (status == MagickFalse)
@@ -735,9 +735,6 @@
{
for (x=0; x < (ssize_t) image->columns; x++)
{
- ssize_t
- i;
-
for (i=0; i < (ssize_t) GetPixelChannels(next); i++)
{
PixelChannel channel = GetPixelChannelChannel(image,i);
@@ -770,9 +767,6 @@
{
for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
{
- ssize_t
- j;
-
for (j=0; j < (ssize_t) (number_images-1); j++)
evaluate_pixel[x].channel[i]*=QuantumScale;
}
@@ -821,8 +815,8 @@
}
}
}
- for (j=0; j < (ssize_t) number_images; j++)
- image_view[j]=DestroyCacheView(image_view[j]);
+ for (n=0; n < (ssize_t) number_images; n++)
+ image_view[n]=DestroyCacheView(image_view[n]);
image_view=(CacheView **) RelinquishMagickMemory(image_view);
evaluate_view=DestroyCacheView(evaluate_view);
evaluate_pixels=DestroyPixelThreadSet(images,evaluate_pixels);
@@ -1489,7 +1483,7 @@
centroid[MaxPixelChannels+1];
ssize_t
- channel,
+ c,
y;
assert(image != (Image *) NULL);
@@ -1552,13 +1546,13 @@
p+=GetPixelChannels(image);
}
}
- for (channel=0; channel <= MaxPixelChannels; channel++)
+ for (c=0; c <= MaxPixelChannels; c++)
{
/*
Compute center of mass (centroid).
*/
- centroid[channel].x=M10[channel]*PerceptibleReciprocal(M00[channel]);
- centroid[channel].y=M01[channel]*PerceptibleReciprocal(M00[channel]);
+ centroid[c].x=M10[c]*PerceptibleReciprocal(M00[c]);
+ centroid[c].y=M01[c]*PerceptibleReciprocal(M00[c]);
}
for (y=0; y < (ssize_t) image->rows; y++)
{
@@ -1635,106 +1629,91 @@
M21[MaxPixelChannels]/=channels;
M22[MaxPixelChannels]/=channels;
M30[MaxPixelChannels]/=channels;
- for (channel=0; channel <= MaxPixelChannels; channel++)
+ for (c=0; c <= MaxPixelChannels; c++)
{
/*
Compute elliptical angle, major and minor axes, eccentricity, & intensity.
*/
- channel_moments[channel].centroid=centroid[channel];
- channel_moments[channel].ellipse_axis.x=sqrt((2.0*
- PerceptibleReciprocal(M00[channel]))*((M20[channel]+M02[channel])+
- sqrt(4.0*M11[channel]*M11[channel]+(M20[channel]-M02[channel])*
- (M20[channel]-M02[channel]))));
- channel_moments[channel].ellipse_axis.y=sqrt((2.0*
- PerceptibleReciprocal(M00[channel]))*((M20[channel]+M02[channel])-
- sqrt(4.0*M11[channel]*M11[channel]+(M20[channel]-M02[channel])*
- (M20[channel]-M02[channel]))));
- channel_moments[channel].ellipse_angle=RadiansToDegrees(1.0/2.0*atan(2.0*
- M11[channel]*PerceptibleReciprocal(M20[channel]-M02[channel])));
- if (fabs(M11[channel]) < 0.0)
+ channel_moments[c].centroid=centroid[c];
+ channel_moments[c].ellipse_axis.x=sqrt((2.0*PerceptibleReciprocal(M00[c]))*
+ ((M20[c]+M02[c])+sqrt(4.0*M11[c]*M11[c]+(M20[c]-M02[c])*(M20[c]-M02[c]))));
+ channel_moments[c].ellipse_axis.y=sqrt((2.0*PerceptibleReciprocal(M00[c]))*
+ ((M20[c]+M02[c])-sqrt(4.0*M11[c]*M11[c]+(M20[c]-M02[c])*(M20[c]-M02[c]))));
+ channel_moments[c].ellipse_angle=RadiansToDegrees(1.0/2.0*atan(2.0*
+ M11[c]*PerceptibleReciprocal(M20[c]-M02[c])));
+ if (fabs(M11[c]) < 0.0)
{
- if ((fabs(M20[channel]-M02[channel]) >= 0.0) &&
- ((M20[channel]-M02[channel]) < 0.0))
- channel_moments[channel].ellipse_angle+=90.0;
+ if ((fabs(M20[c]-M02[c]) >= 0.0) &&
+ ((M20[c]-M02[c]) < 0.0))
+ channel_moments[c].ellipse_angle+=90.0;
}
else
- if (M11[channel] < 0.0)
+ if (M11[c] < 0.0)
{
- if (fabs(M20[channel]-M02[channel]) >= 0.0)
+ if (fabs(M20[c]-M02[c]) >= 0.0)
{
- if ((M20[channel]-M02[channel]) < 0.0)
- channel_moments[channel].ellipse_angle+=90.0;
+ if ((M20[c]-M02[c]) < 0.0)
+ channel_moments[c].ellipse_angle+=90.0;
else
- channel_moments[channel].ellipse_angle+=180.0;
+ channel_moments[c].ellipse_angle+=180.0;
}
}
else
- if ((fabs(M20[channel]-M02[channel]) >= 0.0) &&
- ((M20[channel]-M02[channel]) < 0.0))
- channel_moments[channel].ellipse_angle+=90.0;
- channel_moments[channel].ellipse_eccentricity=sqrt(1.0-(
- channel_moments[channel].ellipse_axis.y*
- channel_moments[channel].ellipse_axis.y*PerceptibleReciprocal(
- channel_moments[channel].ellipse_axis.x*
- channel_moments[channel].ellipse_axis.x)));
- channel_moments[channel].ellipse_intensity=M00[channel]*
- PerceptibleReciprocal(MagickPI*channel_moments[channel].ellipse_axis.x*
- channel_moments[channel].ellipse_axis.y+MagickEpsilon);
+ if ((fabs(M20[c]-M02[c]) >= 0.0) && ((M20[c]-M02[c]) < 0.0))
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/string-private.h
^
|
@@ -41,7 +41,7 @@
}
static inline double StringToDouble(const char *magick_restrict string,
- char **magick_restrict sentinal)
+ char *magick_restrict *sentinal)
{
return(InterpretLocaleValue(string,sentinal));
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/threshold.c
^
|
@@ -1911,9 +1911,7 @@
progress;
ssize_t
- i;
-
- ssize_t
+ i,
y;
ThresholdMap
@@ -1995,19 +1993,17 @@
for (x=0; x < (ssize_t) image->columns; x++)
{
ssize_t
- i;
-
- ssize_t
+ j,
n;
n=0;
- for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
+ for (j=0; j < (ssize_t) GetPixelChannels(image); j++)
{
ssize_t
level,
threshold;
- PixelChannel channel = GetPixelChannelChannel(image,i);
+ PixelChannel channel = GetPixelChannelChannel(image,j);
PixelTrait traits = GetPixelChannelTraits(image,channel);
if ((traits & UpdatePixelTrait) == 0)
continue;
@@ -2016,10 +2012,10 @@
n++;
continue;
}
- threshold=(ssize_t) (QuantumScale*q[i]*(levels[n]*(map->divisor-1)+1));
+ threshold=(ssize_t) (QuantumScale*q[j]*(levels[n]*(map->divisor-1)+1));
level=threshold/(map->divisor-1);
threshold-=level*(map->divisor-1);
- q[i]=ClampToQuantum((double) (level+(threshold >=
+ q[j]=ClampToQuantum((double) (level+(threshold >=
map->levels[(x % map->width)+map->width*(y % map->height)]))*
QuantumRange/levels[n]);
n++;
@@ -2239,9 +2235,6 @@
MagickOffsetType
progress;
- PixelInfo
- threshold;
-
RandomInfo
**magick_restrict random_info;
@@ -2261,7 +2254,6 @@
assert(exception->signature == MagickCoreSignature);
if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
return(MagickFalse);
- GetPixelInfo(image,&threshold);
/*
Random threshold image.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/token-private.h
^
|
@@ -152,7 +152,14 @@
return(octets);
}
-static inline MagickBooleanType IsUTFSpace(int code)
+static inline MagickBooleanType IsNonBreakingUTFSpace(const int code)
+{
+ if (code == 0x00a0)
+ return(MagickTrue);
+ return(MagickFalse);
+}
+
+static inline MagickBooleanType IsUTFSpace(const int code)
{
if (((code >= 0x0009) && (code <= 0x000d)) || (code == 0x0020) ||
(code == 0x0085) || (code == 0x00a0) || (code == 0x1680) ||
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/token.c
^
|
@@ -245,9 +245,6 @@
}
default:
{
- char
- *q;
-
value=StringToDouble(p,&q);
(void) value;
if ((p != q) && (*p != ','))
@@ -360,9 +357,6 @@
done,
match;
- const char
- *magick_restrict p;
-
/*
Return on empty pattern or '*'.
*/
@@ -372,8 +366,8 @@
return(MagickTrue);
if (LocaleCompare(pattern,"*") == 0)
return(MagickTrue);
- p=pattern+strlen(pattern)-1;
- if ((GetUTFCode(p) == ']') && (strchr(pattern,'[') != (char *) NULL))
+ if ((GetUTFCode(pattern+strlen(pattern)-1) == ']') &&
+ (strchr(pattern,'[') != (char *) NULL))
{
ExceptionInfo
*exception;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/vision.c
^
|
@@ -128,6 +128,658 @@
return((int) (q->area-(ssize_t) p->area));
}
+static void PerimeterThreshold(const Image *component_image,
+ CCObjectInfo *object,const ssize_t metric_index,ExceptionInfo *exception)
+{
+ MagickBooleanType
+ status;
+
+ ssize_t
+ i;
+
+ status=MagickTrue;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(dynamic) shared(status) \
+ magick_number_threads(component_image,component_image,component_image->colors,1)
+#endif
+ for (i=0; i < (ssize_t) component_image->colors; i++)
+ {
+ CacheView
+ *component_view;
+
+ RectangleInfo
+ bounding_box;
+
+ size_t
+ pattern[4] = { 1, 0, 0, 0 };
+
+ ssize_t
+ y;
+
+ /*
+ Compute perimeter of each object.
+ */
+ if (status == MagickFalse)
+ continue;
+ component_view=AcquireAuthenticCacheView(component_image,exception);
+ bounding_box=object[i].bounding_box;
+ for (y=(-1); y < (ssize_t) bounding_box.height+1; y++)
+ {
+ const Quantum
+ *magick_restrict p;
+
+ ssize_t
+ x;
+
+ if (status == MagickFalse)
+ continue;
+ p=GetCacheViewVirtualPixels(component_view,bounding_box.x-1,
+ bounding_box.y+y,bounding_box.width+2,2,exception);
+ if (p == (const Quantum *) NULL)
+ {
+ status=MagickFalse;
+ break;
+ }
+ for (x=(-1); x < (ssize_t) bounding_box.width+1; x++)
+ {
+ Quantum
+ pixels[4];
+
+ ssize_t
+ v;
+
+ size_t
+ foreground;
+
+ /*
+ An Algorithm for Calculating Objects’ Shape Features in Binary
+ Images, Lifeng He, Yuyan Chao.
+ */
+ foreground=0;
+ for (v=0; v < 2; v++)
+ {
+ ssize_t
+ u;
+
+ for (u=0; u < 2; u++)
+ {
+ ssize_t
+ offset;
+
+ offset=v*(bounding_box.width+2)*
+ GetPixelChannels(component_image)+u*
+ GetPixelChannels(component_image);
+ pixels[2*v+u]=GetPixelIndex(component_image,p+offset);
+ if ((ssize_t) pixels[2*v+u] == i)
+ foreground++;
+ }
+ }
+ if (foreground == 1)
+ pattern[1]++;
+ else
+ if (foreground == 2)
+ {
+ if ((((ssize_t) pixels[0] == i) &&
+ ((ssize_t) pixels[3] == i)) ||
+ (((ssize_t) pixels[1] == i) &&
+ ((ssize_t) pixels[2] == i)))
+ pattern[0]++; /* diagonal */
+ else
+ pattern[2]++;
+ }
+ else
+ if (foreground == 3)
+ pattern[3]++;
+ p+=GetPixelChannels(component_image);
+ }
+ }
+ component_view=DestroyCacheView(component_view);
+ object[i].metric[metric_index]=ceil(MagickSQ1_2*pattern[1]+1.0*pattern[2]+
+ MagickSQ1_2*pattern[3]+MagickSQ2*pattern[0]-0.5);
+ }
+}
+
+static void CircularityThreshold(const Image *component_image,
+ CCObjectInfo *object,const ssize_t metric_index,ExceptionInfo *exception)
+{
+ MagickBooleanType
+ status;
+
+ ssize_t
+ i;
+
+ status=MagickTrue;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(dynamic) shared(status) \
+ magick_number_threads(component_image,component_image,component_image->colors,1)
+#endif
+ for (i=0; i < (ssize_t) component_image->colors; i++)
+ {
+ CacheView
+ *component_view;
+
+ RectangleInfo
+ bounding_box;
+
+ size_t
+ pattern[4] = { 1, 0, 0, 0 };
+
+ ssize_t
+ y;
+
+ /*
+ Compute perimeter of each object.
+ */
+ if (status == MagickFalse)
+ continue;
+ component_view=AcquireAuthenticCacheView(component_image,exception);
+ bounding_box=object[i].bounding_box;
+ for (y=(-1); y < (ssize_t) bounding_box.height; y++)
+ {
+ const Quantum
+ *magick_restrict p;
+
+ ssize_t
+ x;
+
+ if (status == MagickFalse)
+ continue;
+ p=GetCacheViewVirtualPixels(component_view,bounding_box.x-1,
+ bounding_box.y+y,bounding_box.width+2,2,exception);
+ if (p == (const Quantum *) NULL)
+ {
+ status=MagickFalse;
+ break;
+ }
+ for (x=(-1); x < (ssize_t) bounding_box.width; x++)
+ {
+ Quantum
+ pixels[4];
+
+ ssize_t
+ v;
+
+ size_t
+ foreground;
+
+ /*
+ An Algorithm for Calculating Objects’ Shape Features in Binary
+ Images, Lifeng He, Yuyan Chao.
+ */
+ foreground=0;
+ for (v=0; v < 2; v++)
+ {
+ ssize_t
+ u;
+
+ for (u=0; u < 2; u++)
+ {
+ ssize_t
+ offset;
+
+ offset=v*(bounding_box.width+2)*
+ GetPixelChannels(component_image)+u*
+ GetPixelChannels(component_image);
+ pixels[2*v+u]=GetPixelIndex(component_image,p+offset);
+ if ((ssize_t) pixels[2*v+u] == i)
+ foreground++;
+ }
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/visual-effects.c
^
|
@@ -846,26 +846,26 @@
for (x=0; x < (ssize_t) image->columns; x++)
{
ssize_t
- v;
+ h;
size_t
height;
GetPixelInfoPixel(image,p,&pixel);
height=color_matrix->height > 6 ? 6UL : color_matrix->height;
- for (v=0; v < (ssize_t) height; v++)
+ for (h=0; h < (ssize_t) height; h++)
{
double
sum;
- sum=ColorMatrix[v][0]*GetPixelRed(image,p)+ColorMatrix[v][1]*
- GetPixelGreen(image,p)+ColorMatrix[v][2]*GetPixelBlue(image,p);
+ sum=ColorMatrix[h][0]*GetPixelRed(image,p)+ColorMatrix[h][1]*
+ GetPixelGreen(image,p)+ColorMatrix[h][2]*GetPixelBlue(image,p);
if (image->colorspace == CMYKColorspace)
- sum+=ColorMatrix[v][3]*GetPixelBlack(image,p);
+ sum+=ColorMatrix[h][3]*GetPixelBlack(image,p);
if (image->alpha_trait != UndefinedPixelTrait)
- sum+=ColorMatrix[v][4]*GetPixelAlpha(image,p);
- sum+=QuantumRange*ColorMatrix[v][5];
- switch (v)
+ sum+=ColorMatrix[h][4]*GetPixelAlpha(image,p);
+ sum+=QuantumRange*ColorMatrix[h][5];
+ switch (h)
{
case 0: pixel.red=sum; break;
case 1: pixel.green=sum; break;
@@ -3639,8 +3639,7 @@
magnitude;
ssize_t
- x,
- y;
+ x;
low_pass=(size_t) (number_pixels*((level & 0x01)+1));
#if defined(MAGICKCORE_OPENMP_SUPPORT)
@@ -3657,13 +3656,13 @@
*magick_restrict q;
ssize_t
- x;
+ c;
p=kernel+id*image->columns;
q=pixels+y*image->columns;
- HatTransform(q+high_pass,1,image->columns,(size_t) (1UL << level),p);
+ HatTransform(q+high_pass,1,image->columns,((size_t) 1UL << level),p);
q+=low_pass;
- for (x=0; x < (ssize_t) image->columns; x++)
+ for (c=0; c < (ssize_t) image->columns; c++)
*q++=(*p++);
}
#if defined(MAGICKCORE_OPENMP_SUPPORT)
@@ -3680,12 +3679,12 @@
*magick_restrict q;
ssize_t
- y;
+ r;
p=kernel+id*image->rows;
q=pixels+x+low_pass;
- HatTransform(q,image->columns,image->rows,(size_t) (1UL << level),p);
- for (y=0; y < (ssize_t) image->rows; y++)
+ HatTransform(q,image->columns,image->rows,((size_t) 1UL << level),p);
+ for (r=0; r < (ssize_t) image->rows; r++)
{
*q=(*p++);
q+=image->columns;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickCore/xwindow-private.h
^
|
@@ -57,9 +57,8 @@
*exception; \
\
exception=AcquireExceptionInfo(); \
- (void) ThrowMagickException(exception,GetMagickModule(),severity, \
- tag == (const char *) NULL ? "unknown" : tag,"'%s': %s",context, \
- strerror(errno)); \
+ (void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
+ "'%s': %s",context,strerror(errno)); \
CatchException(exception); \
(void) DestroyExceptionInfo(exception); \
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickWand/mogrify.c
^
|
@@ -4067,11 +4067,11 @@
if (*magic != '\0')
{
char
- filename[MagickPathExtent];
+ name[MagickPathExtent];
- (void) FormatLocaleString(filename,MagickPathExtent,"%s:%s",magic,
+ (void) FormatLocaleString(name,MagickPathExtent,"%s:%s",magic,
image->filename);
- (void) CopyMagickString(image->filename,filename,MagickPathExtent);
+ (void) CopyMagickString(image->filename,name,MagickPathExtent);
}
if ((LocaleCompare(image->filename,"-") != 0) &&
(IsPathWritable(image->filename) != MagickFalse))
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/MagickWand/operation.c
^
|
@@ -1784,7 +1784,7 @@
if (LocaleCompare("annotate",option+1) == 0)
{
char
- geometry[MagickPathExtent];
+ buffer[MagickPathExtent];
SetGeometryInfo(&geometry_info);
flags=ParseGeometry(arg1,&geometry_info);
@@ -1793,9 +1793,9 @@
if ((flags & SigmaValue) == 0)
geometry_info.sigma=geometry_info.rho;
(void) CloneString(&_draw_info->text,arg2);
- (void) FormatLocaleString(geometry,MagickPathExtent,"%+f%+f",
+ (void) FormatLocaleString(buffer,MagickPathExtent,"%+f%+f",
geometry_info.xi,geometry_info.psi);
- (void) CloneString(&_draw_info->geometry,geometry);
+ (void) CloneString(&_draw_info->geometry,buffer);
_draw_info->affine.sx=cos(DegreesToRadians(
fmod(geometry_info.rho,360.0)));
_draw_info->affine.rx=sin(DegreesToRadians(
@@ -1909,12 +1909,6 @@
brightness,
contrast;
- GeometryInfo
- geometry_info;
-
- MagickStatusType
- flags;
-
flags=ParseGeometry(arg1,&geometry_info);
if ((flags & RhoValue) == 0)
CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
@@ -2135,9 +2129,6 @@
black_point,
white_point;
- MagickStatusType
- flags;
-
flags=ParseGeometry(arg1,&geometry_info);
if ((flags & RhoValue) == 0)
CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
@@ -2659,9 +2650,6 @@
gamma,
white_point;
- MagickStatusType
- flags;
-
flags=ParseGeometry(arg1,&geometry_info);
if ((flags & RhoValue) == 0)
CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
@@ -2730,9 +2718,6 @@
black_point,
white_point;
- MagickStatusType
- flags;
-
flags=ParseGeometry(arg1,&geometry_info);
if ((flags & RhoValue) == 0)
CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
@@ -2767,9 +2752,6 @@
}
if (LocaleCompare("local-contrast",option+1) == 0)
{
- MagickStatusType
- flags;
-
flags=ParseGeometry(arg1,&geometry_info);
if ((flags & RhoValue) == 0)
geometry_info.rho=10;
@@ -3067,26 +3049,27 @@
/* Associate a profile with the _image. */
profile_info=CloneImageInfo(_image_info);
profile=GetImageProfile(_image,"iptc");
- if (profile != (StringInfo *) NULL)
+ if (profile != (const StringInfo *) NULL)
profile_info->profile=(void *) CloneStringInfo(profile);
profile_image=GetImageCache(profile_info,arg1,_exception);
profile_info=DestroyImageInfo(profile_info);
if (profile_image == (Image *) NULL)
{
StringInfo
- *profile;
+ *new_profile;
profile_info=CloneImageInfo(_image_info);
(void) CopyMagickString(profile_info->filename,arg1,
MagickPathExtent);
- profile=FileToStringInfo(profile_info->filename,~0UL,_exception);
- if (profile != (StringInfo *) NULL)
+ new_profile=FileToStringInfo(profile_info->filename,~0UL,
+ _exception);
+ if (new_profile != (StringInfo *) NULL)
{
(void) SetImageInfo(profile_info,0,_exception);
(void) ProfileImage(_image,profile_info->magick,
- GetStringInfoDatum(profile),(size_t)
- GetStringInfoLength(profile),_exception);
- profile=DestroyStringInfo(profile);
+ GetStringInfoDatum(new_profile),(size_t)
+ GetStringInfoLength(new_profile),_exception);
+ new_profile=DestroyStringInfo(new_profile);
}
profile_info=DestroyImageInfo(profile_info);
break;
@@ -3096,7 +3079,7 @@
while (name != (const char *) NULL)
{
profile=GetImageProfile(profile_image,name);
- if (profile != (StringInfo *) NULL)
+ if (profile != (const StringInfo *) NULL)
(void) ProfileImage(_image,name,GetStringInfoDatum(profile),
(size_t) GetStringInfoLength(profile),_exception);
name=GetNextImageProfile(profile_image);
@@ -4520,11 +4503,11 @@
*token;
const char
- *arguments;
+ *p;
int
next,
- status;
+ tokenizer_status;
size_t
length;
@@ -4544,17 +4527,17 @@
if (token == (char *) NULL)
break;
next=0;
- arguments=arg1;
+ p=arg1;
token_info=AcquireTokenInfo();
- status=Tokenizer(token_info,0,token,length,arguments,"","=",
+ tokenizer_status=Tokenizer(token_info,0,token,length,p,"","=",
"\"",'\0',&breaker,&next,"e);
token_info=DestroyTokenInfo(token_info);
- if (status == 0)
+ if (tokenizer_status == 0)
{
const char
*argv;
- argv=(&(arguments[next]));
+ argv=(&(p[next]));
(void) InvokeDynamicImageFilter(token,&_images,1,&argv,
_exception);
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/caption.c
^
|
@@ -91,6 +91,22 @@
% o exception: return any errors or warnings in this structure.
%
*/
+
+static inline void AdjustTypeMetricBounds(TypeMetric *metrics)
+{
+ double
+ x1;
+
+ if (metrics->bounds.x1 >= 0.0)
+ {
+ metrics->bounds.x1=0.0;
+ return;
+ }
+ x1=ceil(-metrics->bounds.x1+0.5);
+ metrics->width+=x1+x1;
+ metrics->bounds.x1=x1;
+}
+
static Image *ReadCAPTIONImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
@@ -113,13 +129,13 @@
split,
status;
- ssize_t
- i;
-
size_t
height,
width;
+ ssize_t
+ i;
+
TypeMetric
metrics;
@@ -174,13 +190,15 @@
{
text=AcquireString(caption);
i=FormatMagickCaption(image,draw_info,split,&metrics,&text,exception);
+ AdjustTypeMetricBounds(&metrics);
(void) CloneString(&draw_info->text,text);
text=DestroyString(text);
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
- -metrics.bounds.x1,metrics.ascent);
+ metrics.bounds.x1,metrics.ascent);
if (draw_info->gravity == UndefinedGravity)
(void) CloneString(&draw_info->geometry,geometry);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
+ AdjustTypeMetricBounds(&metrics);
image->columns=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
}
if (image->rows == 0)
@@ -188,13 +206,15 @@
split=MagickTrue;
text=AcquireString(caption);
i=FormatMagickCaption(image,draw_info,split,&metrics,&text,exception);
+ AdjustTypeMetricBounds(&metrics);
(void) CloneString(&draw_info->text,text);
text=DestroyString(text);
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
- -metrics.bounds.x1,metrics.ascent);
+ metrics.bounds.x1,metrics.ascent);
if (draw_info->gravity == UndefinedGravity)
(void) CloneString(&draw_info->geometry,geometry);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
+ AdjustTypeMetricBounds(&metrics);
image->rows=(size_t) ((i+1)*(metrics.ascent-metrics.descent+
draw_info->interline_spacing+draw_info->stroke_width)+0.5);
}
@@ -240,15 +260,17 @@
text=AcquireString(caption);
i=FormatMagickCaption(image,draw_info,split,&metrics,&text,
exception);
+ AdjustTypeMetricBounds(&metrics);
(void) CloneString(&draw_info->text,text);
text=DestroyString(text);
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
- -metrics.bounds.x1,metrics.ascent);
+ metrics.bounds.x1,metrics.ascent);
if (draw_info->gravity == UndefinedGravity)
(void) CloneString(&draw_info->geometry,geometry);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
if (status == MagickFalse)
break;
+ AdjustTypeMetricBounds(&metrics);
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->interline_spacing+
draw_info->stroke_width+0.5);
@@ -270,15 +292,17 @@
text=AcquireString(caption);
i=FormatMagickCaption(image,draw_info,split,&metrics,&text,
exception);
+ AdjustTypeMetricBounds(&metrics);
(void) CloneString(&draw_info->text,text);
text=DestroyString(text);
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
- -metrics.bounds.x1,metrics.ascent);
+ metrics.bounds.x1,metrics.ascent);
if (draw_info->gravity == UndefinedGravity)
(void) CloneString(&draw_info->geometry,geometry);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
if (status == MagickFalse)
break;
+ AdjustTypeMetricBounds(&metrics);
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->interline_spacing+
draw_info->stroke_width+0.5);
@@ -302,11 +326,12 @@
Draw caption.
*/
i=FormatMagickCaption(image,draw_info,split,&metrics,&caption,exception);
+ AdjustTypeMetricBounds(&metrics);
(void) CloneString(&draw_info->text,caption);
caption=DestroyString(caption);
- (void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",MagickMax(
- draw_info->direction == RightToLeftDirection ? (double) image->columns-
- metrics.bounds.x2 : -metrics.bounds.x1,0.0),(draw_info->gravity ==
+ (void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
+ (draw_info->direction == RightToLeftDirection ? (double) image->columns-
+ metrics.bounds.x2 : metrics.bounds.x1),(draw_info->gravity ==
UndefinedGravity ? MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0));
(void) CloneString(&draw_info->geometry,geometry);
status=AnnotateImage(image,draw_info,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/dng.c
^
|
@@ -106,9 +106,6 @@
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(MAGICKCORE_OPENCL_SUPPORT)
static void InitializeDcrawOpenCL(ExceptionInfo *exception)
{
- MagickBooleanType
- opencl_disabled;
-
MagickCLDevice
*devices;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/json.c
^
|
@@ -366,9 +366,6 @@
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ssize_t
- i;
-
if (GetPixelReadMask(image,p) <= (QuantumRange/2))
{
p+=GetPixelChannels(image);
@@ -856,7 +853,7 @@
value->values_length=0;
values[count++]=value;
}
- length=(size_t) (GetStringInfoDatum(profile)[i++] << 8);
+ length=((size_t) GetStringInfoDatum(profile)[i++] << 8);
length|=GetStringInfoDatum(profile)[i++];
attribute=(char *) NULL;
if (~length >= (MagickPathExtent-1))
@@ -955,9 +952,6 @@
MagickBooleanType
ping;
- const Quantum
- *p;
-
ssize_t
i,
x;
@@ -978,8 +972,9 @@
elapsed_time=GetElapsedTime(&image->timer);
user_time=GetUserTime(&image->timer);
GetTimerInfo(&image->timer);
- p=GetVirtualPixels(image,0,0,1,1,exception);
- ping=p == (const Quantum *) NULL ? MagickTrue : MagickFalse;
+ ping=MagickTrue;
+ if (GetVirtualPixels(image,0,0,1,1,exception) != (const Quantum *) NULL)
+ ping=MagickFalse;
(void) ping;
(void) SignatureImage(image,exception);
(void) FormatLocaleFile(file,"{\n");
@@ -1064,12 +1059,12 @@
max_locations;
StatisticType
- type;
+ statistic_type;
/*
Display minimum, maximum, or mean pixel locations.
*/
- type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
+ statistic_type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
MagickFalse,locate);
limit=GetImageArtifact(image,"identify:limit");
if (limit == (const char *) NULL)
@@ -1077,43 +1072,44 @@
max_locations=0;
if (limit != (const char *) NULL)
max_locations=StringToUnsignedLong(limit);
- channel_statistics=GetLocationStatistics(image,type,exception);
+ channel_statistics=GetLocationStatistics(image,statistic_type,exception);
if (channel_statistics == (ChannelStatistics *) NULL)
return(MagickFalse);
(void) FormatLocaleFile(file," \"channel%s\": {\n",locate);
if (image->alpha_trait != UndefinedPixelTrait)
(void) PrintChannelLocations(file,image,AlphaPixelChannel,"alpha",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
switch (image->colorspace)
{
case RGBColorspace:
default:
{
(void) PrintChannelLocations(file,image,RedPixelChannel,"red",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,GreenPixelChannel,"green",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,BluePixelChannel,"blue",
- type,max_locations,MagickFalse,channel_statistics);
+ statistic_type,max_locations,MagickFalse,channel_statistics);
break;
}
case CMYKColorspace:
{
(void) PrintChannelLocations(file,image,CyanPixelChannel,"cyan",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,MagentaPixelChannel,
- "magenta",type,max_locations,MagickTrue,channel_statistics);
+ "magenta",statistic_type,max_locations,MagickTrue,
+ channel_statistics);
(void) PrintChannelLocations(file,image,YellowPixelChannel,"yellow",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,BlackPixelChannel,"black",
- type,max_locations,MagickFalse,channel_statistics);
+ statistic_type,max_locations,MagickFalse,channel_statistics);
break;
}
case LinearGRAYColorspace:
case GRAYColorspace:
{
(void) PrintChannelLocations(file,image,GrayPixelChannel,"gray",
- type,max_locations,MagickFalse,channel_statistics);
+ statistic_type,max_locations,MagickFalse,channel_statistics);
break;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/jxl.c
^
|
@@ -540,7 +540,7 @@
{
memset(&color_encoding,0,sizeof(color_encoding));
JxlColorEncodingSetToLinearSRGB(&color_encoding,
- IsImageGray(image) == GRAYColorspace ? JXL_TRUE : JXL_FALSE);
+ IsImageGray(image) == MagickTrue ? JXL_TRUE : JXL_FALSE);
encoder_status=JxlEncoderSetColorEncoding(encoder,&color_encoding);
}
return(encoder_status);
@@ -654,9 +654,9 @@
float
distance;
- distance=(image_info->quality >= 30) ? 0.1f+(100-MagickMin(100,
- image_info->quality))*0.09f : 6.4f+pow(2.5f,(30-image_info->quality)/
- 5.0f)/6.25f;
+ distance=(image_info->quality >= 30) ? 0.1f+(float) (100-MagickMin(100,
+ image_info->quality))*0.09f : 6.4f+(float) pow(2.5f,(30-
+ image_info->quality)/5.0f)/6.25f;
JxlEncoderOptionsSetDistance(encoder_options,distance);
}
option=GetImageOption(image_info,"jxl:effort");
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/label.c
^
|
@@ -87,6 +87,22 @@
% o exception: return any errors or warnings in this structure.
%
*/
+
+static inline void AdjustTypeMetricBounds(TypeMetric *metrics)
+{
+ double
+ x1;
+
+ if (metrics->bounds.x1 >= 0.0)
+ {
+ metrics->bounds.x1=0.0;
+ return;
+ }
+ x1=ceil(-metrics->bounds.x1+0.5);
+ metrics->width+=x1+x1;
+ metrics->bounds.x1=x1;
+}
+
static Image *ReadLABELImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
@@ -145,6 +161,7 @@
draw_info->text=ConstantString(label);
(void) memset(&metrics,0,sizeof(metrics));
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
+ AdjustTypeMetricBounds(&metrics);
if ((image->columns == 0) && (image->rows == 0))
{
image->columns=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
@@ -168,12 +185,13 @@
for (n=0; n < 32; n++, draw_info->pointsize*=2.0)
{
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
- -metrics.bounds.x1,metrics.ascent);
+ metrics.bounds.x1,metrics.ascent);
if (draw_info->gravity == UndefinedGravity)
(void) CloneString(&draw_info->geometry,geometry);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
if (status == MagickFalse)
break;
+ AdjustTypeMetricBounds(&metrics);
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
if ((image->columns != 0) && (image->rows != 0))
@@ -198,12 +216,13 @@
{
draw_info->pointsize=(low+high)/2.0;
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
- -metrics.bounds.x1,metrics.ascent);
+ metrics.bounds.x1,metrics.ascent);
if (draw_info->gravity == UndefinedGravity)
(void) CloneString(&draw_info->geometry,geometry);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
if (status == MagickFalse)
break;
+ AdjustTypeMetricBounds(&metrics);
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
if ((image->columns != 0) && (image->rows != 0))
@@ -224,6 +243,7 @@
{
draw_info->pointsize=floor((low+high)/2.0-0.5);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
+ AdjustTypeMetricBounds(&metrics);
}
}
label=DestroyString(label);
@@ -260,8 +280,8 @@
*/
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
(draw_info->direction == RightToLeftDirection ? (double) image->columns-
- metrics.bounds.x2 : 0.0),(draw_info->gravity == UndefinedGravity ?
- MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0));
+ metrics.bounds.x2 : metrics.bounds.x1),(draw_info->gravity ==
+ UndefinedGravity ? MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0));
(void) CloneString(&draw_info->geometry,geometry);
status=AnnotateImage(image,draw_info,exception);
if (image_info->pointsize == 0.0)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/meta.c
^
|
@@ -360,19 +360,15 @@
if (state == 0)
{
int
- state,
- next;
+ s,
+ n;
- char
- brkused,
- quoted;
-
- state=0;
- next=0;
+ s=0;
+ n=0;
while (Tokenizer(token_info,0,newstr,inputlen,token,"","#",
- "", 0,&brkused,&next,"ed)==0)
+ "", 0,&brkused,&n,"ed)==0)
{
- switch (state)
+ switch (s)
{
case 0:
if (strcmp(newstr,"8BIM")==0)
@@ -390,34 +386,30 @@
(void) strcpy(name,newstr);
break;
}
- state++;
+ s++;
}
}
else
if (state == 1)
{
int
- next;
+ n;
ssize_t
len;
- char
- brkused,
- quoted;
-
- next=0;
+ n=0;
len = (ssize_t) strlen(token);
while (Tokenizer(token_info,0,newstr,inputlen,token,"","&",
- "",0,&brkused,&next,"ed)==0)
+ "",0,&brkused,&n,"ed)==0)
{
- if (brkused && next > 0)
+ if (brkused && n > 0)
{
size_t
codes_length;
char
- *s = &token[next-1];
+ *s = &token[n-1];
codes_length=convertHTMLcodes(s);
if ((ssize_t) codes_length > len)
@@ -487,10 +479,10 @@
(void) WriteBlobMSBLong(ofile, (unsigned int) len);
outputlen += 4;
- next=0;
+ n=0;
outputlen += len;
while (len-- > 0)
- (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
+ (void) WriteBlobByte(ofile,(unsigned char) token[n++]);
if (outputlen & 1)
{
@@ -518,10 +510,10 @@
(void) WriteBlobByte(ofile,(unsigned char) (recnum & 0xff));
(void) WriteBlobMSBShort(ofile,(unsigned short) len);
outputlen += 5;
- next=0;
+ n=0;
outputlen += len;
while (len-- > 0)
- (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
+ (void) WriteBlobByte(ofile,(unsigned char) token[n++]);
}
}
}
@@ -678,19 +670,15 @@
if (state == 0)
{
int
- state,
- next;
+ s,
+ n;
- char
- brkused,
- quoted;
-
- state=0;
- next=0;
+ s=0;
+ n=0;
while (Tokenizer(token_info,0,newstr,inputlen,token,"","#",
- "",0,&brkused,&next,"ed)==0)
+ "",0,&brkused,&n,"ed)==0)
{
- switch (state)
+ switch (s)
{
case 0:
if (strcmp(newstr,"8BIM")==0)
@@ -708,34 +696,30 @@
(void) CopyMagickString(name,newstr,strlen(newstr)+MagickPathExtent);
break;
}
- state++;
+ s++;
}
}
else
if (state == 1)
{
int
- next;
+ n;
ssize_t
len;
- char
- brkused,
- quoted;
-
- next=0;
+ n=0;
len = (ssize_t) strlen(token);
while (Tokenizer(token_info,0,newstr,inputlen,token,"","&",
- "",0,&brkused,&next,"ed)==0)
+ "",0,&brkused,&n,"ed)==0)
{
- if (brkused && next > 0)
+ if (brkused && n > 0)
{
size_t
codes_length;
char
- *s = &token[next-1];
+ *s = &token[n-1];
codes_length=convertHTMLcodes(s);
if ((ssize_t) codes_length > len)
@@ -796,10 +780,10 @@
(void) WriteBlobMSBLong(ofile,(unsigned int) len);
outputlen += 4;
- next=0;
+ n=0;
outputlen += len;
while (len--)
- (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
+ (void) WriteBlobByte(ofile,(unsigned char) token[n++]);
if (outputlen & 1)
{
@@ -827,10 +811,10 @@
(void) WriteBlobByte(ofile,(unsigned char) (recnum & 0xff));
(void) WriteBlobMSBShort(ofile,(unsigned short) len);
outputlen += 5;
- next=0;
+ n=0;
outputlen += len;
while (len--)
- (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
+ (void) WriteBlobByte(ofile,(unsigned char) token[n++]);
}
}
}
@@ -2323,7 +2307,6 @@
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- length=0;
if (LocaleCompare(image_info->magick,"8BIM") == 0)
{
/*
@@ -2333,8 +2316,8 @@
if (profile == (StringInfo *) NULL)
ThrowWriterException(CoderError,"No8BIMDataIsAvailable");
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/miff.c
^
|
@@ -457,7 +457,7 @@
#if defined(MAGICKCORE_LZMA_DELEGATE)
lzma_stream
initialize_lzma = LZMA_STREAM_INIT,
- lzma_info;
+ lzma_info = LZMA_STREAM_INIT;
lzma_allocator
allocator;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/mpc.c
^
|
@@ -155,9 +155,6 @@
keyword[MagickPathExtent],
*options;
- const unsigned char
- *p;
-
GeometryInfo
geometry_info;
@@ -892,6 +889,9 @@
depth=GetImageQuantumDepth(image,MagickFalse);
if (image->storage_class == PseudoClass)
{
+ const unsigned char
+ *p;
+
size_t
packet_size;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/msl.c
^
|
@@ -1803,12 +1803,12 @@
for (j=0; j < msl_info->n; j++)
{
const char
- *attribute;
+ *prop;
- attribute=GetImageProperty(msl_info->attributes[j],"id",
+ prop=GetImageProperty(msl_info->attributes[j],"id",
exception);
- if ((attribute != (const char *) NULL) &&
- (LocaleCompare(attribute,value) == 0))
+ if ((prop != (const char *) NULL) &&
+ (LocaleCompare(prop,value) == 0))
{
composite_image=CloneImage(msl_info->image[j],0,0,
MagickFalse,exception);
@@ -1913,11 +1913,11 @@
for (j=0; j < msl_info->n; j++)
{
const char
- *attribute;
+ *prop;
- attribute=GetImageProperty(msl_info->attributes[j],"id",
+ prop=GetImageProperty(msl_info->attributes[j],"id",
exception);
- if ((attribute != (const char *) NULL) &&
+ if ((prop != (const char *) NULL) &&
(LocaleCompare(value,value) == 0))
{
SetImageType(composite_image,TrueColorAlphaType,
@@ -1939,10 +1939,9 @@
{
ssize_t
opacity,
- y;
+ k,
+ r;
- ssize_t
- x;
Quantum
*q;
@@ -1963,11 +1962,11 @@
(void) SetImageAlpha(composite_image,OpaqueAlpha,
exception);
composite_view=AcquireAuthenticCacheView(composite_image,exception);
- for (y=0; y < (ssize_t) composite_image->rows ; y++)
+ for (r=0; r < (ssize_t) composite_image->rows ; r++)
{
- q=GetCacheViewAuthenticPixels(composite_view,0,y,
+ q=GetCacheViewAuthenticPixels(composite_view,0,r,
(ssize_t) composite_image->columns,1,exception);
- for (x=0; x < (ssize_t) composite_image->columns; x++)
+ for (k=0; k < (ssize_t) composite_image->columns; k++)
{
if (GetPixelAlpha(composite_image,q) == OpaqueAlpha)
SetPixelAlpha(composite_image,
@@ -3648,12 +3647,12 @@
for (j=0; j < msl_info->n; j++)
{
const char
- *attribute;
+ *prop;
- attribute=GetImageProperty(msl_info->attributes[j],"id",
+ prop=GetImageProperty(msl_info->attributes[j],"id",
exception);
- if ((attribute != (const char *) NULL) &&
- (LocaleCompare(attribute,value) == 0))
+ if ((prop != (const char *) NULL) &&
+ (LocaleCompare(prop,value) == 0))
{
affinity_image=CloneImage(msl_info->image[j],0,0,
MagickFalse,exception);
@@ -4371,7 +4370,7 @@
for (i=0; (attributes[i] != (const xmlChar *) NULL); i++)
{
const char
- *name;
+ *profile_name;
const StringInfo
*profile;
@@ -4415,7 +4414,7 @@
*p;
StringInfo
- *profile;
+ *new_profile;
(void) CopyMagickString(filename,keyword,MagickPathExtent);
(void) CopyMagickString(name,keyword,MagickPathExtent);
@@ -4435,26 +4434,26 @@
*q=(*++p);
break;
}
- profile=FileToStringInfo(filename,~0UL,exception);
- if (profile != (StringInfo *) NULL)
+ new_profile=FileToStringInfo(filename,~0UL,exception);
+ if (new_profile != (StringInfo *) NULL)
{
(void) ProfileImage(msl_info->image[n],name,
- GetStringInfoDatum(profile),(size_t)
- GetStringInfoLength(profile),exception);
- profile=DestroyStringInfo(profile);
+ GetStringInfoDatum(new_profile),(size_t)
+ GetStringInfoLength(new_profile),exception);
+ new_profile=DestroyStringInfo(new_profile);
}
continue;
}
ResetImageProfileIterator(profile_image);
- name=GetNextImageProfile(profile_image);
- while (name != (const char *) NULL)
+ profile_name=GetNextImageProfile(profile_image);
+ while (profile_name != (const char *) NULL)
{
- profile=GetImageProfile(profile_image,name);
+ profile=GetImageProfile(profile_image,profile_name);
if (profile != (StringInfo *) NULL)
- (void) ProfileImage(msl_info->image[n],name,
+ (void) ProfileImage(msl_info->image[n],profile_name,
GetStringInfoDatum(profile),(size_t)
GetStringInfoLength(profile),exception);
- name=GetNextImageProfile(profile_image);
+ profile_name=GetNextImageProfile(profile_image);
}
profile_image=DestroyImage(profile_image);
}
@@ -4905,34 +4904,34 @@
if (status != MagickFalse)
{
Image
- *image;
+ *target;
- image=msl_info->attributes[n];
- FormatImageProperty(image,"msl:font-metrics.pixels_per_em.x",
+ target=msl_info->attributes[n];
+ FormatImageProperty(target,"msl:font-metrics.pixels_per_em.x",
"%g",metrics.pixels_per_em.x);
- FormatImageProperty(image,"msl:font-metrics.pixels_per_em.y",
+ FormatImageProperty(target,"msl:font-metrics.pixels_per_em.y",
"%g",metrics.pixels_per_em.y);
- FormatImageProperty(image,"msl:font-metrics.ascent","%g",
+ FormatImageProperty(target,"msl:font-metrics.ascent","%g",
metrics.ascent);
- FormatImageProperty(image,"msl:font-metrics.descent","%g",
+ FormatImageProperty(target,"msl:font-metrics.descent","%g",
metrics.descent);
- FormatImageProperty(image,"msl:font-metrics.width","%g",
+ FormatImageProperty(target,"msl:font-metrics.width","%g",
metrics.width);
- FormatImageProperty(image,"msl:font-metrics.height","%g",
+ FormatImageProperty(target,"msl:font-metrics.height","%g",
metrics.height);
- FormatImageProperty(image,"msl:font-metrics.max_advance","%g",
+ FormatImageProperty(target,"msl:font-metrics.max_advance","%g",
metrics.max_advance);
- FormatImageProperty(image,"msl:font-metrics.bounds.x1","%g",
+ FormatImageProperty(target,"msl:font-metrics.bounds.x1","%g",
metrics.bounds.x1);
- FormatImageProperty(image,"msl:font-metrics.bounds.y1","%g",
+ FormatImageProperty(target,"msl:font-metrics.bounds.y1","%g",
metrics.bounds.y1);
- FormatImageProperty(image,"msl:font-metrics.bounds.x2","%g",
+ FormatImageProperty(target,"msl:font-metrics.bounds.x2","%g",
metrics.bounds.x2);
- FormatImageProperty(image,"msl:font-metrics.bounds.y2","%g",
+ FormatImageProperty(target,"msl:font-metrics.bounds.y2","%g",
metrics.bounds.y2);
- FormatImageProperty(image,"msl:font-metrics.origin.x","%g",
+ FormatImageProperty(target,"msl:font-metrics.origin.x","%g",
metrics.origin.x);
- FormatImageProperty(image,"msl:font-metrics.origin.y","%g",
+ FormatImageProperty(target,"msl:font-metrics.origin.y","%g",
metrics.origin.y);
}
draw_info=DestroyDrawInfo(draw_info);
@@ -5056,17 +5055,17 @@
if (LocaleCompare(keyword,"filename") == 0)
{
Image
- *image;
+ *next;
if (value == (char *) NULL)
break;
(void) CopyMagickString(msl_info->image_info[n]->filename,
value,MagickPathExtent);
- image=ReadImage(msl_info->image_info[n],exception);
+ next=ReadImage(msl_info->image_info[n],exception);
CatchException(exception);
- if (image == (Image *) NULL)
+ if (next == (Image *) NULL)
continue;
- AppendImageToList(&msl_info->image[n],image);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/palm.c
^
|
@@ -232,6 +232,9 @@
static Image *ReadPALMImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
+ const size_t
+ one=1;
+
Image
*image;
@@ -269,7 +272,6 @@
redbits,
greenbits,
bluebits,
- one,
pad,
size,
bit;
@@ -338,7 +340,6 @@
/*
Initialize image colormap.
*/
- one=1;
if ((bits_per_pixel < 16) &&
(AcquireImageColormap(image,one << bits_per_pixel,exception) == MagickFalse))
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
@@ -360,7 +361,7 @@
if (bits_per_pixel == 8)
{
ssize_t
- index;
+ idx;
if (flags & PALM_HAS_COLORMAP_FLAG)
{
@@ -368,24 +369,24 @@
for (i=0; i < (ssize_t) count; i++)
{
ReadBlobByte(image);
- index=ConstrainColormapIndex(image,255-i,exception);
- image->colormap[index].red=(MagickRealType)
+ idx=ConstrainColormapIndex(image,255-i,exception);
+ image->colormap[idx].red=(MagickRealType)
ScaleCharToQuantum((unsigned char) ReadBlobByte(image));
- image->colormap[index].green=(MagickRealType)
+ image->colormap[idx].green=(MagickRealType)
ScaleCharToQuantum((unsigned char) ReadBlobByte(image));
- image->colormap[index].blue=(MagickRealType)
+ image->colormap[idx].blue=(MagickRealType)
ScaleCharToQuantum((unsigned char) ReadBlobByte(image));
}
}
else
- for (i=0; i < (ssize_t) (1L << bits_per_pixel); i++)
+ for (i=0; i < ((ssize_t) 1L << bits_per_pixel); i++)
{
- index=ConstrainColormapIndex(image,255-i,exception);
- image->colormap[index].red=(MagickRealType)
+ idx=ConstrainColormapIndex(image,255-i,exception);
+ image->colormap[idx].red=(MagickRealType)
ScaleCharToQuantum(PalmPalette[i][0]);
- image->colormap[index].green=(MagickRealType)
+ image->colormap[idx].green=(MagickRealType)
ScaleCharToQuantum(PalmPalette[i][1]);
- image->colormap[index].blue=(MagickRealType)
+ image->colormap[idx].blue=(MagickRealType)
ScaleCharToQuantum(PalmPalette[i][2]);
}
}
@@ -455,11 +456,7 @@
else
if (compressionType == PALM_COMPRESSION_SCANLINE)
{
- size_t
- one;
-
/* TODO move out of loop! */
- one=1;
image->compression=FaxCompression;
for (i=0; i < (ssize_t) bytes_per_row; i+=8)
{
@@ -542,10 +539,12 @@
}
if (flags & PALM_HAS_TRANSPARENCY_FLAG)
{
- ssize_t index=ConstrainColormapIndex(image,(ssize_t) (mask-
+ ssize_t
+ idx;
+ idx=ConstrainColormapIndex(image,(ssize_t) (mask-
transparentIndex),exception);
if (bits_per_pixel != 16)
- transpix=image->colormap[index];
+ transpix=image->colormap[idx];
(void) TransparentPaintImage(image,&transpix,(Quantum) TransparentAlpha,
MagickFalse,exception);
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/pdb.c
^
|
@@ -587,7 +587,7 @@
c;
char
- *p;
+ *r;
size_t
length;
@@ -595,9 +595,6 @@
num_pad_bytes = (size_t) (comment_offset - TellBlob( image ));
while (num_pad_bytes-- != 0)
{
- int
- c;
-
c=ReadBlobByte(image);
if (c == EOF)
break;
@@ -609,23 +606,23 @@
c=ReadBlobByte(image);
length=MagickPathExtent;
comment=AcquireString((char *) NULL);
- for (p=comment; c != EOF; p++)
+ for (r=comment; c != EOF; r++)
{
- if ((size_t) (p-comment+MagickPathExtent) >= length)
+ if ((size_t) (r-comment+MagickPathExtent) >= length)
{
- *p='\0';
+ *r='\0';
length<<=1;
length+=MagickPathExtent;
comment=(char *) ResizeQuantumMemory(comment,length+
MagickPathExtent,sizeof(*comment));
if (comment == (char *) NULL)
break;
- p=comment+strlen(comment);
+ r=comment+strlen(comment);
}
- *p=c;
+ *r=c;
c=ReadBlobByte(image);
}
- *p='\0';
+ *r='\0';
if (comment == (char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
(void) SetImageProperty(image,"comment",comment,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/pdf.c
^
|
@@ -2383,7 +2383,7 @@
else
{
const unsigned char
- *p;
+ *r;
/*
Write ICC profile.
@@ -2402,9 +2402,9 @@
(void) WriteBlobString(image,buffer);
offset=TellBlob(image);
Ascii85Initialize(image);
- p=GetStringInfoDatum(icc_profile);
+ r=GetStringInfoDatum(icc_profile);
for (i=0; i < (ssize_t) GetStringInfoLength(icc_profile); i++)
- Ascii85Encode(image,(unsigned char) *p++);
+ Ascii85Encode(image,(unsigned char) *r++);
Ascii85Flush(image);
offset=TellBlob(image)-offset;
(void) WriteBlobString(image,"endstream\n");
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/pict.c
^
|
@@ -1147,7 +1147,7 @@
*p;
size_t
- j;
+ k;
ssize_t
bytes_per_line;
@@ -1212,14 +1212,14 @@
{
for (i=0; i < (ssize_t) tile_image->colors; i++)
{
- j=ReadBlobMSBShort(image) % tile_image->colors;
+ k=ReadBlobMSBShort(image) % tile_image->colors;
if ((flags & 0x8000) != 0)
- j=(size_t) i;
- tile_image->colormap[j].red=(Quantum)
+ k=(size_t) i;
+ tile_image->colormap[k].red=(Quantum)
ScaleShortToQuantum(ReadBlobMSBShort(image));
- tile_image->colormap[j].green=(Quantum)
+ tile_image->colormap[k].green=(Quantum)
ScaleShortToQuantum(ReadBlobMSBShort(image));
- tile_image->colormap[j].blue=(Quantum)
+ tile_image->colormap[k].blue=(Quantum)
ScaleShortToQuantum(ReadBlobMSBShort(image));
}
}
@@ -1300,14 +1300,14 @@
if (pixmap.bits_per_pixel == 16)
{
i=(ssize_t) (*p++);
- j=(size_t) (*p);
+ k=(size_t) (*p);
SetPixelRed(tile_image,ScaleCharToQuantum(
(unsigned char) ((i & 0x7c) << 1)),q);
SetPixelGreen(tile_image,ScaleCharToQuantum(
(unsigned char) (((i & 0x03) << 6) |
- ((j & 0xe0) >> 2))),q);
+ ((k & 0xe0) >> 2))),q);
SetPixelBlue(tile_image,ScaleCharToQuantum(
- (unsigned char) ((j & 0x1f) << 3)),q);
+ (unsigned char) ((k & 0x1f) << 3)),q);
}
else
if (tile_image->alpha_trait == UndefinedPixelTrait)
@@ -1470,9 +1470,6 @@
const void
*stream;
- ssize_t
- count;
-
unsigned char
*pixels;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/png.c
^
|
@@ -471,7 +471,7 @@
setjmp/longjmp is alleged to be unsafe on these platforms:
*/
#ifdef PNG_SETJMP_SUPPORTED
-# ifndef IMPNG_SETJMP_IS_THREAD_SAFE
+# ifndef SETJMP_IS_THREAD_SAFE
# define IMPNG_SETJMP_NOT_THREAD_SAFE
# endif
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/ps.c
^
|
@@ -1381,6 +1381,9 @@
const char
*value;
+ const Quantum
+ *p;
+
const StringInfo
*profile;
@@ -1415,13 +1418,6 @@
media_info,
page_info;
- const Quantum
- *p;
-
- ssize_t
- i,
- x;
-
unsigned char
*q;
@@ -1437,7 +1433,9 @@
text_size;
ssize_t
+ i,
j,
+ x,
y;
time_t
@@ -1627,15 +1625,6 @@
Image
*preview_image;
- Quantum
- pixel;
-
- ssize_t
- x;
-
- ssize_t
- y;
-
/*
Create preview image.
*/
@@ -1662,9 +1651,12 @@
byte=0;
for (x=0; x < (ssize_t) preview_image->columns; x++)
{
+ Quantum
+ luma;
+
byte<<=1;
- pixel=ClampToQuantum(GetPixelLuma(preview_image,p));
- if (pixel >= (Quantum) (QuantumRange/2))
+ luma=ClampToQuantum(GetPixelLuma(preview_image,p));
+ if (luma >= (Quantum) (QuantumRange/2))
byte|=0x01;
bit++;
if (bit == 8)
@@ -1783,9 +1775,6 @@
{
if (type == GrayscaleType)
{
- Quantum
- pixel;
-
/*
Dump image as grayscale.
*/
@@ -1801,9 +1790,12 @@
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- pixel=(Quantum) ScaleQuantumToChar(ClampToQuantum(GetPixelLuma(
+ Quantum
+ luma;
+
+ luma=(Quantum) ScaleQuantumToChar(ClampToQuantum(GetPixelLuma(
image,p)));
- q=PopHexPixel(hex_digits,(size_t) pixel,q);
+ q=PopHexPixel(hex_digits,(size_t) luma,q);
if ((q-pixels+8) >= 80)
{
*q++='\n';
@@ -1828,12 +1820,6 @@
}
else
{
- ssize_t
- y;
-
- Quantum
- pixel;
-
/*
Dump image as bitmap.
*/
@@ -1851,9 +1837,12 @@
byte=0;
for (x=0; x < (ssize_t) image->columns; x++)
{
+ Quantum
+ luma;
+
byte<<=1;
- pixel=ClampToQuantum(GetPixelLuma(image,p));
- if (pixel >= (Quantum) (QuantumRange/2))
+ luma=ClampToQuantum(GetPixelLuma(image,p));
+ if (luma >= (Quantum) (QuantumRange/2))
byte|=0x01;
bit++;
if (bit == 8)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/ps3.c
^
|
@@ -1155,9 +1155,6 @@
(void) WriteBlobString(image,"/ClipImage {} def\n");
else
{
- const char
- *value;
-
value=GetImageProperty(image,image->magick_filename,exception);
if (value == (const char *) NULL)
return(MagickFalse);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/sgi.c
^
|
@@ -931,9 +931,6 @@
i,
x;
- unsigned char
- *q;
-
size_t
imageListLength;
@@ -1132,6 +1129,9 @@
offset,
*offsets;
+ unsigned char
+ *q;
+
/*
Convert SGI uncompressed pixels.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/sixel.c
^
|
@@ -160,11 +160,11 @@
if (hue > HLSMAX)
hue -= HLSMAX;
if (hue < (HLSMAX/6))
- return(n1 + (((n2-n1)*hue+(HLSMAX/12))/(HLSMAX/6)));
+ return(n1 + (((ssize_t) (n2-n1)*hue+(HLSMAX/12))/(HLSMAX/6)));
if (hue < (HLSMAX/2))
return(n2);
if (hue < ((HLSMAX*2)/3))
- return(n1+(((n2-n1)*(((HLSMAX*2)/3)-hue)+(HLSMAX/12))/(HLSMAX/6)));
+ return(n1+(((ssize_t) (n2-n1)*(((HLSMAX*2)/3)-hue)+(HLSMAX/12))/(HLSMAX/6)));
return(n1);
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/svg.c
^
|
@@ -3337,7 +3337,6 @@
DelegateWarning,reason,"`%s`",message);
message=DestroyString(message);
va_end(operands);
- svg_info->parser->instate=XML_PARSER_EOF;
}
static void SVGError(void *,const char *,...)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/tiff.c
^
|
@@ -2085,9 +2085,6 @@
uint32
*p;
- uint32
- *pixels;
-
/*
Convert generic TIFF image.
*/
@@ -2102,15 +2099,15 @@
generic_info=AcquireVirtualMemory(number_pixels,sizeof(uint32));
if (generic_info == (MemoryInfo *) NULL)
ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
- pixels=(uint32 *) GetVirtualMemoryBlob(generic_info);
+ p=(uint32 *) GetVirtualMemoryBlob(generic_info);
status=TIFFReadRGBAImage(tiff,(uint32) image->columns,(uint32)
- image->rows,(uint32 *) pixels,0);
+ image->rows,(uint32 *) p,0);
if (status == -1)
{
generic_info=RelinquishVirtualMemory(generic_info);
break;
}
- p=pixels+(image->columns*image->rows)-1;
+ p+=(image->columns*image->rows)-1;
for (y=0; y < (ssize_t) image->rows; y++)
{
ssize_t
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/tim2.c
^
|
@@ -185,7 +185,7 @@
case RGBA32:
return ScaleCharToQuantum(word>>channel*8 & ~(~0x0U<<8));
default:
- return -1;
+ return QuantumRange;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/webp.c
^
|
@@ -361,35 +361,38 @@
(void) WebPMuxGetFeatures(mux,&webp_flags);
if ((webp_flags & ICCP_FLAG) &&
(WebPMuxGetChunk(mux,"ICCP",&chunk) == WEBP_MUX_OK))
- {
- profile=BlobToStringInfo(chunk.bytes,chunk.size);
- if (profile != (StringInfo *) NULL)
- {
- SetImageProfile(image,"ICC",profile,exception);
- profile=DestroyStringInfo(profile);
- }
- }
+ if (chunk.size != 0)
+ {
+ profile=BlobToStringInfo(chunk.bytes,chunk.size);
+ if (profile != (StringInfo *) NULL)
+ {
+ SetImageProfile(image,"ICC",profile,exception);
+ profile=DestroyStringInfo(profile);
+ }
+ }
if ((webp_flags & EXIF_FLAG) &&
(WebPMuxGetChunk(mux,"EXIF",&chunk) == WEBP_MUX_OK))
- {
- profile=BlobToStringInfo(chunk.bytes,chunk.size);
- if (profile != (StringInfo *) NULL)
- {
- SetImageProfile(image,"EXIF",profile,exception);
- profile=DestroyStringInfo(profile);
- }
- }
+ if (chunk.size != 0)
+ {
+ profile=BlobToStringInfo(chunk.bytes,chunk.size);
+ if (profile != (StringInfo *) NULL)
+ {
+ SetImageProfile(image,"EXIF",profile,exception);
+ profile=DestroyStringInfo(profile);
+ }
+ }
if (((webp_flags & XMP_FLAG) &&
(WebPMuxGetChunk(mux,"XMP ",&chunk) == WEBP_MUX_OK)) ||
(WebPMuxGetChunk(mux,"XMP\0",&chunk) == WEBP_MUX_OK))
- {
- profile=BlobToStringInfo(chunk.bytes,chunk.size);
- if (profile != (StringInfo *) NULL)
- {
- SetImageProfile(image,"XMP",profile,exception);
- profile=DestroyStringInfo(profile);
- }
- }
+ if (chunk.size != 0)
+ {
+ profile=BlobToStringInfo(chunk.bytes,chunk.size);
+ if (profile != (StringInfo *) NULL)
+ {
+ SetImageProfile(image,"XMP",profile,exception);
+ profile=DestroyStringInfo(profile);
+ }
+ }
WebPMuxDelete(mux);
}
#endif
@@ -975,7 +978,7 @@
if (webp_status != 0)
{
- // add last null frame and assemble picture.
+ /* add last null frame and assemble picture. */
webp_status=WebPAnimEncoderAdd(enc,(WebPPicture *) NULL,
(int) frame_timestamp,configure);
if (webp_status != 0)
@@ -1029,7 +1032,7 @@
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"UnableToEncodeImageFile","`%s'",image->filename);
- // Clean up returned data
+ /* Clean up returned data */
memset(webp_data, 0, sizeof(*webp_data));
mux_error=WEBP_MUX_OK;
if (image->iterations > 0)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/coders/yaml.c
^
|
@@ -368,9 +368,6 @@
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ssize_t
- i;
-
if (GetPixelReadMask(image,p) <= (QuantumRange/2))
{
p+=GetPixelChannels(image);
@@ -854,7 +851,7 @@
value->values_length=0;
values[count++]=value;
}
- length=(size_t) (GetStringInfoDatum(profile)[i++] << 8);
+ length=((size_t) GetStringInfoDatum(profile)[i++] << 8);
length|=GetStringInfoDatum(profile)[i++];
attribute=(char *) NULL;
if (~length >= (MagickPathExtent-1))
@@ -953,9 +950,6 @@
MagickBooleanType
ping;
- const Quantum
- *p;
-
ssize_t
i,
x;
@@ -976,8 +970,9 @@
elapsed_time=GetElapsedTime(&image->timer);
user_time=GetUserTime(&image->timer);
GetTimerInfo(&image->timer);
- p=GetVirtualPixels(image,0,0,1,1,exception);
- ping=p == (const Quantum *) NULL ? MagickTrue : MagickFalse;
+ ping=MagickTrue;
+ if (GetVirtualPixels(image,0,0,1,1,exception) != (const Quantum *) NULL)
+ ping=MagickFalse;
(void) ping;
(void) SignatureImage(image,exception);
(void) FormatLocaleFile(file,"---\n");
@@ -1062,12 +1057,12 @@
max_locations;
StatisticType
- type;
+ statistic_type;
/*
Display minimum, maximum, or mean pixel locations.
*/
- type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
+ statistic_type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
MagickFalse,locate);
limit=GetImageArtifact(image,"identify:limit");
if (limit == (const char *) NULL)
@@ -1075,43 +1070,44 @@
max_locations=0;
if (limit != (const char *) NULL)
max_locations=StringToUnsignedLong(limit);
- channel_statistics=GetLocationStatistics(image,type,exception);
+ channel_statistics=GetLocationStatistics(image,statistic_type,exception);
if (channel_statistics == (ChannelStatistics *) NULL)
return(MagickFalse);
(void) FormatLocaleFile(file," channel%s: \n",locate);
if (image->alpha_trait != UndefinedPixelTrait)
(void) PrintChannelLocations(file,image,AlphaPixelChannel,"alpha",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
switch (image->colorspace)
{
case RGBColorspace:
default:
{
(void) PrintChannelLocations(file,image,RedPixelChannel,"red",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,GreenPixelChannel,"green",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,BluePixelChannel,"blue",
- type,max_locations,MagickFalse,channel_statistics);
+ statistic_type,max_locations,MagickFalse,channel_statistics);
break;
}
case CMYKColorspace:
{
(void) PrintChannelLocations(file,image,CyanPixelChannel,"cyan",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,MagentaPixelChannel,
- "magenta",type,max_locations,MagickTrue,channel_statistics);
+ "magenta",statistic_type,max_locations,MagickTrue,
+ channel_statistics);
(void) PrintChannelLocations(file,image,YellowPixelChannel,"yellow",
- type,max_locations,MagickTrue,channel_statistics);
+ statistic_type,max_locations,MagickTrue,channel_statistics);
(void) PrintChannelLocations(file,image,BlackPixelChannel,"black",
- type,max_locations,MagickFalse,channel_statistics);
+ statistic_type,max_locations,MagickFalse,channel_statistics);
break;
}
case LinearGRAYColorspace:
case GRAYColorspace:
{
(void) PrintChannelLocations(file,image,GrayPixelChannel,"gray",
- type,max_locations,MagickFalse,channel_statistics);
+ statistic_type,max_locations,MagickFalse,channel_statistics);
break;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ImageMagick 7.1.0-8.
+# Generated by GNU Autoconf 2.69 for ImageMagick 7.1.0-9.
#
# Report bugs to <https://github.com/ImageMagick/ImageMagick/issues>.
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='ImageMagick'
PACKAGE_TARNAME='ImageMagick'
-PACKAGE_VERSION='7.1.0-8'
-PACKAGE_STRING='ImageMagick 7.1.0-8'
+PACKAGE_VERSION='7.1.0-9'
+PACKAGE_STRING='ImageMagick 7.1.0-9'
PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues'
PACKAGE_URL='https://imagemagick.org'
@@ -1856,7 +1856,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ImageMagick 7.1.0-8 to adapt to many kinds of systems.
+\`configure' configures ImageMagick 7.1.0-9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1932,7 +1932,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ImageMagick 7.1.0-8:";;
+ short | recursive ) echo "Configuration of ImageMagick 7.1.0-9:";;
esac
cat <<\_ACEOF
@@ -2227,7 +2227,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ImageMagick configure 7.1.0-8
+ImageMagick configure 7.1.0-9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3278,7 +3278,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ImageMagick $as_me 7.1.0-8, which was
+It was created by ImageMagick $as_me 7.1.0-9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4266,7 +4266,7 @@
# Define the identity of the package.
PACKAGE='ImageMagick'
- VERSION='7.1.0-8'
+ VERSION='7.1.0-9'
# Some tools Automake needs.
@@ -4559,11 +4559,11 @@
MAGICK_MICRO_VERSION=0
-MAGICK_PATCHLEVEL_VERSION=8
+MAGICK_PATCHLEVEL_VERSION=9
-MAGICK_VERSION=7.1.0-8
+MAGICK_VERSION=7.1.0-9
-MAGICK_GIT_REVISION=19096:957e47818:20210912
+MAGICK_GIT_REVISION=19218:442703a3e:20211003
# Substitute library versioning
@@ -4585,15 +4585,15 @@
PACKAGE_BASE_VERSION=7.1.0
-PACKAGE_PATCHLEVEL_VERSION=8
+PACKAGE_PATCHLEVEL_VERSION=9
-PACKAGE_VERSION_ADDENDUM=-8
+PACKAGE_VERSION_ADDENDUM=-9
PACKAGE_LIB_VERSION=0x710
-PACKAGE_LIB_VERSION_NUMBER=7,1,0,8
+PACKAGE_LIB_VERSION_NUMBER=7,1,0,9
-PACKAGE_RELEASE_DATE=2021-09-12
+PACKAGE_RELEASE_DATE=2021-09-26
# Ensure that make can run correctly
@@ -36848,7 +36848,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ImageMagick $as_me 7.1.0-8, which was
+This file was extended by ImageMagick $as_me 7.1.0-9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -36915,7 +36915,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ImageMagick config.status 7.1.0-8
+ImageMagick config.status 7.1.0-9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/filters/analyze.c
^
|
@@ -110,8 +110,8 @@
((GetImagePixelCacheType(destination) != MemoryCache) &&
(GetImagePixelCacheType(destination) != MapCache)))
return(MagickMax(MagickMin(GetMagickResourceLimit(ThreadResource),2),1));
- return(MagickMax(MagickMin((ssize_t) GetMagickResourceLimit(ThreadResource),
- (ssize_t) (chunk)/64),1));
+ return(MagickMax(MagickMin((int) GetMagickResourceLimit(ThreadResource),
+ (int) (chunk)/64),1));
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.9+obs1.1.tar.xz/upstream/m4/version.m4
^
|
@@ -27,7 +27,7 @@
m4_define([magick_major_version], [7])
m4_define([magick_minor_version], [1])
m4_define([magick_micro_version], [0])
-m4_define([magick_patchlevel_version], [8])
+m4_define([magick_patchlevel_version], [9])
m4_define([magick_bugreport],
[https://github.com/ImageMagick/ImageMagick/issues])
m4_define([magick_url], [https://imagemagick.org])
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick.yaml
^
|
@@ -1,7 +1,7 @@
Name: ImageMagick
-### DO NOT FORGET TO BUMP mfr_version below !!!
+### DO NOT FORGET TO BUMP mfr_revision below !!!
### Also, the builds script needs this to not be a macro
-Version: 7.1.0.8
+Version: 7.1.0.9
Release: 1.1
Summary: Viewer and Converter for Images
Group: Applications/Multimedia
@@ -12,7 +12,7 @@
- "%{name}-%{version}.tar.xz"
Macros:
#- 'debug_build;0'
- - 'mfr_revision;8'
+ - 'mfr_revision;9'
- 'maj;7'
- 'mfr_version;%{maj}.1.0'
- 'quantum_depth;16'
|