Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ImageMagick to 7.1.1-44 #23

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OPENCL_INCLUDE_PATH := $(OPENCL_PATH)/qualcomm/include

LTDL_LIB_PATH := $(LOCAL_PATH)/libltdl-2.4.6

IMAGE_MAGICK_BASEDIR := ImageMagick-7.1.1-43
IMAGE_MAGICK_BASEDIR := ImageMagick-7.1.1-44
IMAGE_MAGICK := $(LOCAL_PATH)/$(IMAGE_MAGICK_BASEDIR)

JPEG_LIB_PATH := $(LOCAL_PATH)/libjpeg-turbo-2.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3568,10 +3568,15 @@ void Magick::Image::magnify(void)
}

void Magick::Image::map(const Image &mapImage_,const bool dither_)
{
map(mapImage_, dither_ ? RiemersmaDitherMethod : NoDitherMethod);
}

void Magick::Image::map(const Image &mapImage_,const DitherMethod ditherMethod_)
{
modifyImage();
GetPPException;
options()->quantizeDither(dither_);
options()->quantizeDither(ditherMethod_);
RemapImage(options()->quantizeInfo(),image(),mapImage_.constImage(),
exceptionInfo);
ThrowImageException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ namespace Magick

// Remap image colors with closest color from reference image
void map(const Image &mapImage_,const bool dither_=false);
void map(const Image &mapImage_,const DitherMethod ditherMethod_);

// Delineate arbitrarily shaped clusters in the image.
void meanShift(const size_t width_,const size_t height_,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ namespace Magick
// Dither image during quantization.
void quantizeDither(const bool ditherFlag_);
bool quantizeDither(void) const;
void quantizeDither(const DitherMethod ditherMethod_);

// Dither method
void quantizeDitherMethod(const DitherMethod ditherMethod_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,16 +472,20 @@ Magick::ColorspaceType Magick::Options::quantizeColorSpace(void) const

void Magick::Options::quantizeDither(const bool ditherFlag_)
{
_imageInfo->dither=(MagickBooleanType) ditherFlag_;
_quantizeInfo->dither_method=ditherFlag_ ? RiemersmaDitherMethod :
NoDitherMethod;
quantizeDither(ditherFlag_ ? RiemersmaDitherMethod : NoDitherMethod);
}

bool Magick::Options::quantizeDither(void) const
{
return(static_cast<bool>(_imageInfo->dither));
}

void Magick::Options::quantizeDither(const DitherMethod ditherMethod_)
{
_imageInfo->dither=(MagickBooleanType) (ditherMethod_ != NoDitherMethod);
_quantizeInfo->dither_method=ditherMethod_;
}

void Magick::Options::quantizeDitherMethod(const DitherMethod ditherMethod_)
{
_quantizeInfo->dither_method=ditherMethod_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1740,9 +1740,9 @@ MagickExport Image *XAnimateImages(Display *display,
*/
windows->image.flags|=USPosition;
windows->image.x=(XDisplayWidth(display,visual_info->screen)/2)-
((ssize_t) windows->image.width/2);
((int) windows->image.width/2);
windows->image.y=(XDisplayHeight(display,visual_info->screen)/2)-
((ssize_t) windows->image.height/2);
((int) windows->image.height/2);
}
manager_hints->flags=IconWindowHint | InputHint | StateHint;
manager_hints->icon_window=windows->icon.id;
Expand Down Expand Up @@ -2421,7 +2421,7 @@ MagickExport Image *XAnimateImages(Display *display,
if (windows->command.mapped == MagickFalse)
{
windows->command.x=event.xconfigure.x-
(ssize_t) windows->command.width-25;
(int) windows->command.width-25;
windows->command.y=event.xconfigure.y;
XConstrainWindowPosition(display,&windows->command);
window_changes.x=windows->command.x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ static inline MagickBooleanType IsValidPixelOffset(const ssize_t x,
{
if (extent == 0)
return(MagickTrue);
if ((x >= (MAGICK_SSIZE_MAX/(ssize_t) extent)) ||
(x <= (MAGICK_SSIZE_MIN/(ssize_t) extent)))
if ((x >= (ssize_t) (MAGICK_SSIZE_MAX/(ssize_t) extent)) ||
(x <= (ssize_t) (MAGICK_SSIZE_MIN/(ssize_t) extent)))
return(MagickFalse);
return(MagickTrue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ MagickExport CacheView *AcquireVirtualCacheView(const Image *image,
cache_view->debug=(GetLogEventMask() & CacheEvent) != 0 ? MagickTrue :
MagickFalse;
cache_view->signature=MagickCoreSignature;
if (cache_view->nexus_info == (NexusInfo **) NULL)
ThrowFatalException(CacheFatalError,"UnableToAcquireCacheView");
return(cache_view);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,9 @@ MagickPrivate Cache AcquirePixelCache(const size_t number_threads)
cache_info->number_threads=number_threads;
if (GetOpenMPMaximumThreads() > cache_info->number_threads)
cache_info->number_threads=GetOpenMPMaximumThreads();
if (GetMagickResourceLimit(ThreadResource) > cache_info->number_threads)
cache_info->number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
if (cache_info->number_threads == 0)
cache_info->number_threads=1;
cache_info->nexus_info=AcquirePixelCacheNexus(cache_info->number_threads);
if (cache_info->nexus_info == (NexusInfo **) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
value=GetEnvironmentValue("MAGICK_SYNCHRONIZE");
if (value != (const char *) NULL)
{
Expand Down Expand Up @@ -2682,11 +2678,11 @@ static inline ssize_t EdgeY(const ssize_t y,const size_t rows)
return(y);
}

static inline MagickBooleanType IsOffsetOverflow(const ssize_t x,
const ssize_t y)
static inline MagickBooleanType IsOffsetOverflow(const MagickOffsetType x,
const MagickOffsetType y)
{
if (((y > 0) && (x > (MAGICK_SSIZE_MAX-y))) ||
((y < 0) && (x < (MAGICK_SSIZE_MIN-y))))
if (((y > 0) && (x > ((MagickOffsetType) MAGICK_SSIZE_MAX-y))) ||
((y < 0) && (x < ((MagickOffsetType) MAGICK_SSIZE_MIN-y))))
return(MagickFalse);
return(MagickTrue);
}
Expand Down Expand Up @@ -2784,7 +2780,7 @@ MagickPrivate const Quantum *GetVirtualPixelCacheNexus(const Image *image,
if (IsValidPixelOffset(nexus_info->region.y,cache_info->columns) == MagickFalse)
return((const Quantum *) NULL);
offset=nexus_info->region.y*(MagickOffsetType) cache_info->columns;
if (IsOffsetOverflow(offset,nexus_info->region.x) == MagickFalse)
if (IsOffsetOverflow(offset,(MagickOffsetType) nexus_info->region.x) == MagickFalse)
return((const Quantum *) NULL);
offset+=nexus_info->region.x;
length=(MagickSizeType) (nexus_info->region.height-1L)*cache_info->columns+
Expand Down Expand Up @@ -3681,7 +3677,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
#else
(void) ThrowMagickException(exception,GetMagickModule(),
MissingDelegateError,"DelegateLibrarySupportNotBuiltIn",
"'%s' (policy requires anonymous memory mapping)",image->filename);
"`%s' (policy requires anonymous memory mapping)",image->filename);
#endif
}
value=DestroyString(value);
Expand All @@ -3692,8 +3688,12 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
assert(cache_info->signature == MagickCoreSignature);
if (((MagickSizeType) image->columns > cache_info->width_limit) ||
((MagickSizeType) image->rows > cache_info->height_limit))
ThrowBinaryException(ImageError,"WidthOrHeightExceedsLimit",
image->filename);
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
"WidthOrHeightExceedsLimit","`%s' (%.20gx%.20g)",image->filename,
(double) cache_info->width_limit,(double) cache_info->height_limit);
return(MagickFalse);
}
if (GetMagickResourceLimit(ListLengthResource) != MagickResourceInfinity)
{
length=GetImageListLength(image);
Expand Down Expand Up @@ -4632,7 +4632,7 @@ static MagickBooleanType ReadPixelCachePixels(
if (IsValidPixelOffset(nexus_info->region.y,cache_info->columns) == MagickFalse)
return(MagickFalse);
offset=nexus_info->region.y*(MagickOffsetType) cache_info->columns;
if ((offset/(MagickOffsetType) cache_info->columns) != nexus_info->region.y)
if ((ssize_t) (offset/cache_info->columns) != nexus_info->region.y)
return(MagickFalse);
offset+=nexus_info->region.x;
number_channels=cache_info->number_channels;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ MagickExport MagickBooleanType SortColormapByIntensity(Image *image,
ssize_t
i;

i=ConstrainColormapIndex(image,GetPixelIndex(image,q),exception);
i=ConstrainColormapIndex(image,(ssize_t) GetPixelIndex(image,q),exception);
index=(Quantum) pixels[i];
SetPixelIndex(image,index,q);
SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q);
Expand Down
Loading
Loading