diff --git a/.github/workflows/app-image.yml b/.github/workflows/app-image.yml index ae316e4a4..7899408e4 100644 --- a/.github/workflows/app-image.yml +++ b/.github/workflows/app-image.yml @@ -85,8 +85,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -e - # wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh - bash ./app-image/upload.sh ImageMagick*AppImage* + wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + bash ./upload.sh ImageMagick*AppImage* - name: Upload ImageMagick AppImage if: "!contains(github.ref, 'tags')" diff --git a/ChangeLog b/ChangeLog index d4078cf53..eb4952291 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,30 @@ +2021-06-12 7.1.0-0 + * Release ImageMagick version 7.1.0-0 GIT revision 18806:d64f1bb3a:20210612 + +2021-06-02 7.1.0-0 + * SVG no longer hangs when handling class in (reference + https://github.com/ImageMagick/ImageMagick/issues/3818). + * Bump minor version (reference + https://github.com/ImageMagick/ImageMagick/issues/3768) + +2021-06-02 7.0.11-15 + * Raise exception for invalid compose:args geometry (reference + https://github.com/ImageMagick/ImageMagick/issues/3765). + 2021-05-31 7.0.11-14 * Release ImageMagick version 7.0.11-14 GIT revision 18775:354f421e4:20210531 +2021-05-20 7.0.11-14 Dirk Lemstra + * Added support for reading and writing 16-bit jxl images. + 2021-05-17 7.0.11-13 * Release ImageMagick version 7.0.11-13 GIT revision 18751:0365211b2:20210517 2021-05-12 7.0.11-13 Dirk Lemstra * Fixed reading and writing the XMP chunk in a WebP image (reference https://github.com/ImageMagick/ImageMagick/discussions/3617). + * Added support to set the jpeg-xl encoding effort with + -define jxl:effort= 2021-05-09 7.0.11-13 * label and caption sanity check is too conservative. diff --git a/MagickCore/cache.c b/MagickCore/cache.c index ccf8d5cc4..25caa8597 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -3392,18 +3392,13 @@ static inline Quantum ApplyPixelCompositeMask(const Quantum p, const MagickRealType alpha,const Quantum q,const MagickRealType beta) { double - mask_alpha; + gamma; - Quantum - pixel; - - if (fabs((double) (alpha-OpaqueAlpha)) < MagickEpsilon) - return(p); - mask_alpha=1.0-QuantumScale*QuantumScale*alpha*beta; - mask_alpha=PerceptibleReciprocal(mask_alpha); - pixel=ClampToQuantum(mask_alpha*MagickOver_((double) p,alpha,(double) q, - beta)); - return(pixel); + if (fabs((double) (alpha-TransparentAlpha)) < MagickEpsilon) + return(q); + gamma=1.0-QuantumScale*QuantumScale*alpha*beta; + gamma=PerceptibleReciprocal(gamma); + return(ClampToQuantum(gamma*MagickOver_((double) p,alpha,(double) q,beta))); } static MagickBooleanType MaskPixelCacheNexus(Image *image,NexusInfo *nexus_info, @@ -3445,20 +3440,19 @@ static MagickBooleanType MaskPixelCacheNexus(Image *image,NexusInfo *nexus_info, for (x=0; x < (ssize_t) nexus_info->region.width; x++) { double - mask_alpha; + alpha; ssize_t i; - mask_alpha=(double) GetPixelCompositeMask(image,p); + alpha=(double) GetPixelCompositeMask(image,p); for (i=0; i < (ssize_t) image->number_channels; i++) { PixelChannel channel = GetPixelChannelChannel(image,i); PixelTrait traits = GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; - q[i]=ApplyPixelCompositeMask(p[i],mask_alpha,q[i],(MagickRealType) - GetPixelAlpha(image,q)); + q[i]=ApplyPixelCompositeMask(q[i],alpha,p[i],GetPixelAlpha(image,p)); } p+=GetPixelChannels(image); q+=GetPixelChannels(image); diff --git a/MagickCore/compare.c b/MagickCore/compare.c index 46e5c1ecd..35e378631 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -1557,9 +1557,12 @@ static MagickBooleanType GetStructuralSimilarityDistortion(const Image *image, channel_distortion[i]+=ssim; channel_distortion[CompositePixelChannel]+=ssim; } - area++; p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); +#if defined(MAGICKCORE_OPENMP_SUPPORT) + #pragma omp atomic +#endif + area++; } #if defined(MAGICKCORE_OPENMP_SUPPORT) #pragma omp critical (MagickCore_GetStructuralSimilarityDistortion) diff --git a/MagickCore/composite.c b/MagickCore/composite.c index 00c62a9c8..d35e640aa 100644 --- a/MagickCore/composite.c +++ b/MagickCore/composite.c @@ -1164,7 +1164,12 @@ MagickExport MagickBooleanType CompositeImage(Image *image, SetGeometryInfo(&geometry_info); value=GetImageArtifact(image,"compose:args"); if (value != (char *) NULL) - (void) ParseGeometry(value,&geometry_info); + { + flags=ParseGeometry(value,&geometry_info); + if (flags == NoValue) + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "InvalidGeometry","`%s'",value); + } break; } case ModulateCompositeOp: diff --git a/MagickCore/delegate.c b/MagickCore/delegate.c index bef9abcd3..6d8d58ffb 100644 --- a/MagickCore/delegate.c +++ b/MagickCore/delegate.c @@ -2003,11 +2003,11 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file, (void) FormatLocaleFile(file,"%11s%c=%c%s ",delegate_info[i]->decode ? delegate_info[i]->decode : "",delegate_info[i]->mode <= 0 ? '<' : ' ', delegate_info[i]->mode >= 0 ? '>' : ' ',delegate); - StripString(commands[0]); + (void) StripMagickString(commands[0]); (void) FormatLocaleFile(file,"\"%s\"\n",commands[0]); for (j=1; commands[j] != (char *) NULL; j++) { - StripString(commands[j]); + (void) StripMagickString(commands[j]); (void) FormatLocaleFile(file," \"%s\"\n",commands[j]); } for (j=0; commands[j] != (char *) NULL; j++) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 136fb3931..d70fe2f3d 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -91,7 +91,7 @@ Define declarations. */ #define BezierQuantum 200 -#define PrimitiveExtentPad 4096.0 +#define PrimitiveExtentPad 4296.0 #define MaxBezierCoordinates 67108864 #define ThrowPointExpectedException(token,exception) \ { \ @@ -2723,7 +2723,8 @@ static MagickBooleanType RenderMVGContent(Image *image, if (LocaleCompare(token,graphic_context[n]->id) == 0) break; mvg_class=(const char *) GetValueFromSplayTree(macros,token); - if ((mvg_class != (const char *) NULL) && (p > primitive)) + if ((graphic_context[n]->render != MagickFalse) && + (mvg_class != (const char *) NULL) && (p > primitive)) { char *elements; diff --git a/MagickCore/fx.c b/MagickCore/fx.c index cd51e789a..62fd7ed6d 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -771,7 +771,7 @@ static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel, } } (void) CopyMagickString(symbol,p,MagickPathExtent); - StripString(symbol); + (void) StripMagickString(symbol); if (*symbol == '\0') { switch (channel) diff --git a/MagickCore/nt-base.h b/MagickCore/nt-base.h index 802645ab4..dc12b58ad 100644 --- a/MagickCore/nt-base.h +++ b/MagickCore/nt-base.h @@ -276,6 +276,7 @@ extern "C" { #if !defined(unlink) # define unlink _unlink #endif +#define MAGICKCORE_HAVE_UTIME 1 #if !defined(utime) # define utime(filename,time) _utime(filename,(struct _utimbuf*) time) #endif diff --git a/MagickCore/nt-feature.c b/MagickCore/nt-feature.c index 88ae736fb..7e5576ad7 100644 --- a/MagickCore/nt-feature.c +++ b/MagickCore/nt-feature.c @@ -376,7 +376,7 @@ MagickExport MagickBooleanType NTAcquireTypeCache(SplayTreeInfo *type_cache, } (void) CopyMagickString(buffer,value_name,family_extent-value_name+1); - StripString(buffer); + (void) StripMagickString(buffer); type_info->family=ConstantString(buffer); list_entries++; diff --git a/MagickCore/profile.c b/MagickCore/profile.c index 2783c4b1a..5b3d4dfc2 100644 --- a/MagickCore/profile.c +++ b/MagickCore/profile.c @@ -1023,14 +1023,18 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name, cms_exception.exception=exception; cms_context=cmsCreateContext(NULL,&cms_exception); if (cms_context == (cmsContext) NULL) - ThrowBinaryException(ResourceLimitError, - "ColorspaceColorProfileMismatch",name); + { + profile=DestroyStringInfo(profile); + ThrowBinaryException(ResourceLimitError, + "ColorspaceColorProfileMismatch",name); + } cmsSetLogErrorHandlerTHR(cms_context,CMSExceptionHandler); source_info.profile=cmsOpenProfileFromMemTHR(cms_context, GetStringInfoDatum(profile),(cmsUInt32Number) GetStringInfoLength(profile)); if (source_info.profile == (cmsHPROFILE) NULL) { + profile=DestroyStringInfo(profile); cmsDeleteContext(cms_context); ThrowBinaryException(ResourceLimitError, "ColorspaceColorProfileMismatch",name); diff --git a/MagickCore/string.c b/MagickCore/string.c index 711ab61b7..8e0e2e937 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -1847,7 +1847,7 @@ MagickExport char *StringInfoToDigest(const StringInfo *signature) *digest; SignatureInfo - *signature_info; + *signature_info; signature_info=AcquireSignatureInfo(); UpdateSignature(signature_info,signature); @@ -2483,25 +2483,31 @@ MagickExport StringInfo *StringToStringInfo(const char *string) % % % % % % -% S t r i p S t r i n g % +% S t r i p M a g i c k S t r i n g % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% StripString() strips any whitespace or quotes from the beginning and end of -% a string of characters. +% StripMagickString() strips any whitespace or quotes from the beginning and +% end of a string of characters. It returns the stripped string length. % -% The format of the StripString method is: +% The format of the StripMagickString method is: % -% void StripString(char *message) +% size_t StripMagickString(char *message) % % A description of each parameter follows: % % o message: Specifies an array of characters. % */ + MagickExport void StripString(char *message) +{ + (void) StripMagickString(message); +} + +MagickExport size_t StripMagickString(char *message) { char *p, @@ -2512,8 +2518,10 @@ MagickExport void StripString(char *message) assert(message != (char *) NULL); if (*message == '\0') - return; + return(0); length=strlen(message); + if (length == 1) + return(1); p=message; while (isspace((int) ((unsigned char) *p)) != 0) p++; @@ -2530,6 +2538,7 @@ MagickExport void StripString(char *message) for (p=message; *p != '\0'; p++) if (*p == '\n') *p=' '; + return((size_t) (q-p+1)); } /* diff --git a/MagickCore/string_.h b/MagickCore/string_.h index 2005a25d1..1afa88a7b 100644 --- a/MagickCore/string_.h +++ b/MagickCore/string_.h @@ -80,7 +80,8 @@ extern MagickExport size_t const size_t) magick_attribute((__nonnull__)), CopyMagickString(char *magick_restrict,const char *magick_restrict, const size_t) magick_attribute((__nonnull__)), - GetStringInfoLength(const StringInfo *); + GetStringInfoLength(const StringInfo *), + StripMagickString(char *); extern MagickExport ssize_t FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *, diff --git a/PerlMagick/quantum/quantum.pm b/PerlMagick/quantum/quantum.pm index db40807e1..d9985c7c3 100644 --- a/PerlMagick/quantum/quantum.pm +++ b/PerlMagick/quantum/quantum.pm @@ -43,7 +43,7 @@ require AutoLoader; ConfigureError FatalErrorException ); -$VERSION = '7.0.11'; +$VERSION = '7.1.0'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/README.md b/README.md index 402879417..338d1519f 100644 --- a/README.md +++ b/README.md @@ -30,36 +30,37 @@ We continue to maintain the legacy release of ImageMagick, version 6, at https:/ Here are just a few examples of what ImageMagick can do: -* [Format conversion](https://imagemagick.org/script/convert.php): convert an image from one [format](https://imagemagick.org/script/formats.php) to another (e.g. PNG to JPEG). -* [Transform](https://legacy.imagemagick.org/Usage/resize/): resize, rotate, deskew, crop, flip or trim an image. -* [Transparency](https://legacy.imagemagick.org/Usage/masking/): render portions of an image invisible. -* [Draw](https://legacy.imagemagick.org/Usage/draw/): add shapes or text to an image. +* [Bilateral Blur](https://imagemagick.org/script/command-line-options.php#bilateral-blur): non-linear, edge-preserving, and noise-reducing smoothing filter. +* [Color management](https://imagemagick.org/script/color-management.php): accurate color management with color profiles or in lieu of-- built-in gamma compression or expansion as demanded by the colorspace. +* [Complex text layout](https://en.wikipedia.org/wiki/Complex_text_layout) bidirectional text support and shaping. +* [Composite](https://imagemagick.org/script/composite.php): overlap one image over another. +* [Connected component labeling](https://imagemagick.org/script/connected-components.php): uniquely label connected regions in an image. * [Decorate](https://legacy.imagemagick.org/Usage/crop/): add a border or frame to an image. -* [Special effects](https://legacy.imagemagick.org/Usage/blur/): blur, sharpen, threshold, or tint an image. -* [Text & comments](https://legacy.imagemagick.org/Usage/text/): insert descriptive or artistic text in an image. +* [Delineate image features](https://legacy.imagemagick.org/Usage/transform/#vision): Canny edge detection, mean-shift, Hough lines. +* [Discrete Fourier transform](https://legacy.imagemagick.org/Usage/fourier/): implements the forward and inverse [DFT](http://en.wikipedia.org/wiki/Discrete_Fourier_transform). +* [Distributed pixel cache](https://imagemagick.org/script/distribute-pixel-cache.php): offload intermediate pixel storage to one or more remote servers. +* [Draw](https://legacy.imagemagick.org/Usage/draw/): add shapes or text to an image. +* [Encipher or decipher an image](https://imagemagick.org/script/cipher.php): convert ordinary images into unintelligible gibberish and back again. +* [Format conversion](https://imagemagick.org/script/convert.php): convert an image from one [format](https://imagemagick.org/script/formats.php) to another (e.g. PNG to JPEG). +* [Generalized pixel distortion](https://legacy.imagemagick.org/Usage/distorts/): correct for, or induce image distortions including perspective. +* [Heterogeneous distributed processing](https://imagemagick.org/script/architecture.php#distributed): certain algorithms are OpenCL-enabled to take advantage of speed-ups offered by executing in concert across heterogeneous platforms consisting of CPUs, GPUs, and other processors. +* [High dynamic-range images](https://imagemagick.org/script/high-dynamic-range.php): accurately represent the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows. +* [Image cache](https://imagemagick.org/script/magick-cache.php): methods and tools to cache images, image sequences, video, audio or metadata in a local folder. +* [Image calculator](https://imagemagick.org/script/fx.php): apply a mathematical expression to an image or image channels. * [Image gradients](https://imagemagick.org/script/gradient.php): create a gradual blend of one color whose shape is horizontal, vertical, circular, or ellipical. * [Image identification](https://imagemagick.org/script/identify.php): describe the format and attributes of an image. -* [Composite](https://imagemagick.org/script/composite.php): overlap one image over another. +* [ImageMagick on the iPhone](https://imagemagick.org/script/download.php#iOS): convert, edit, or compose images on your iPhone. +* [Large image support](https://imagemagick.org/script/architecture.php#tera-pixel): read, process, or write mega-, giga-, or tera-pixel image sizes. * [Montage](https://imagemagick.org/script/montage.php): juxtapose image thumbnails on an image canvas. -* [Generalized pixel distortion](https://legacy.imagemagick.org/Usage/distorts/): correct for, or induce image distortions including perspective. * [Morphology of shapes](https://legacy.imagemagick.org/Usage/morphology/): extract features, describe shapes and recognize patterns in images. -* [Delineate image features](https://legacy.imagemagick.org/Usage/transform/#vision): Canny edge detection, mean-shift, Hough lines. * [Motion picture support](https://imagemagick.org/script/motion-picture.php): read and write the common image formats used in digital film work. -* [Image calculator](https://imagemagick.org/script/fx.php): apply a mathematical expression to an image or image channels. -* [Connected component labeling](https://imagemagick.org/script/connected-components.php): uniquely label connected regions in an image. -* [Discrete Fourier transform](https://legacy.imagemagick.org/Usage/fourier/): implements the forward and inverse [DFT](http://en.wikipedia.org/wiki/Discrete_Fourier_transform). * [Perceptual hash](http://www.fmwconcepts.com/misc_tests/perceptual_hash_test_results_510/index.html): maps visually identical images to the same or similar hash-- useful in image retrieval, authentication, indexing, or copy detection as well as digital watermarking. -* [Complex text layout](https://en.wikipedia.org/wiki/Complex_text_layout) bidirectional text support and shaping. -* [Color management](https://imagemagick.org/script/color-management.php): accurate color management with color profiles or in lieu of-- built-in gamma compression or expansion as demanded by the colorspace. -* [Bilateral Blur](https://imagemagick.org/script/command-line-options.php#bilateral-blur): non-linear, edge-preserving, and noise-reducing smoothing filter. -* [High dynamic-range images](https://imagemagick.org/script/high-dynamic-range.php): accurately represent the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows. -* [Encipher or decipher an image](https://imagemagick.org/script/cipher.php): convert ordinary images into unintelligible gibberish and back again. -* [Virtual pixel support](https://imagemagick.org/script/architecture.php#virtual-pixels): convenient access to pixels outside the image region. -* [Large image support](https://imagemagick.org/script/architecture.php#tera-pixel): read, process, or write mega-, giga-, or tera-pixel image sizes. +* [Special effects](https://legacy.imagemagick.org/Usage/blur/): blur, sharpen, threshold, or tint an image. +* [Text & comments](https://legacy.imagemagick.org/Usage/text/): insert descriptive or artistic text in an image. * [Threads of execution support](https://imagemagick.org/script/architecture.php#threads): ImageMagick is thread safe and most internal algorithms are OpenMP-enabled to take advantage of speed-ups offered by multicore processor chips. -* [Distributed pixel cache](https://imagemagick.org/script/distribute-pixel-cache.php): offload intermediate pixel storage to one or more remote servers. -* [Heterogeneous distributed processing](https://imagemagick.org/script/architecture.php#distributed): certain algorithms are OpenCL-enabled to take advantage of speed-ups offered by executing in concert across heterogeneous platforms consisting of CPUs, GPUs, and other processors. -* [ImageMagick on the iPhone](https://imagemagick.org/script/download.php#iOS): convert, edit, or compose images on your iPhone. +* [Transform](https://legacy.imagemagick.org/Usage/resize/): resize, rotate, deskew, crop, flip or trim an image. +* [Transparency](https://legacy.imagemagick.org/Usage/masking/): render portions of an image invisible. +* [Virtual pixel support](https://imagemagick.org/script/architecture.php#virtual-pixels): convenient access to pixels outside the image region. [Examples of ImageMagick Usage](https://legacy.imagemagick.org/Usage/), shows how to use ImageMagick from the command-line to accomplish any of these tasks and much more. Also, see [Fred's ImageMagick Scripts](http://www.fmwconcepts.com/imagemagick/): a plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations. With [Magick.NET](https://github.com/dlemstra/Magick.NET), use ImageMagick without having to install ImageMagick on your server or desktop. diff --git a/app-image/upload.sh b/app-image/upload.sh deleted file mode 100644 index 83ff3d63f..000000000 --- a/app-image/upload.sh +++ /dev/null @@ -1,307 +0,0 @@ -#!/bin/bash - -set +x # Do not leak information - -# Exit immediately if one of the files given as arguments is not there -# because we don't want to delete the existing release if we don't have -# the new files that should be uploaded -for file in "$@" -do - if [ ! -e "$file" ] - then echo "$file is missing, giving up." >&2; exit 1 - fi -done - -if [ $# -eq 0 ]; then - echo "No artifacts to use for release, giving up." - exit 0 -fi - -if command -v sha256sum >/dev/null 2>&1 ; then - shatool="sha256sum" -elif command -v shasum >/dev/null 2>&1 ; then - shatool="shasum -a 256" # macOS fallback -else - echo "Neither sha256sum nor shasum is available, cannot check hashes" -fi - -RELEASE_BODY="" -GIT_REPO_SLUG="$REPO_SLUG" - -GIT_COMMIT="$TRAVIS_COMMIT" -GIT_TAG="$TRAVIS_TAG" - -if [ ! -z "$TRAVIS_REPO_SLUG" ] ; then - GIT_REPO_SLUG="$TRAVIS_REPO_SLUG" - RELEASE_BODY="Travis CI build log: ${TRAVIS_BUILD_WEB_URL}" -elif [ ! -z "$GITHUB_ACTIONS" ] ; then - GIT_COMMIT="$GITHUB_SHA" - GIT_REPO_SLUG="$GITHUB_REPOSITORY" - if [[ "$GITHUB_REF" == "refs/tags/"* ]] ; then - GIT_TAG="${GITHUB_REF#refs/tags/}" - fi - RELEASE_BODY="GitHub Actions build log: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" -fi - -if [ ! -z "$UPLOADTOOL_BODY" ] ; then - RELEASE_BODY="$UPLOADTOOL_BODY" -fi - -# The calling script (usually .travis.yml) can set a suffix to be used for -# the tag and release name. This way it is possible to have a release for -# the output of the CI/CD pipeline (marked as 'continuous') and also test -# builds for other branches. -# If this build was triggered by a tag, call the result a Release -if [ ! -z "$UPLOADTOOL_SUFFIX" ] ; then - if [ "$UPLOADTOOL_SUFFIX" = "$GIT_TAG" ] ; then - RELEASE_NAME="$GIT_TAG" - RELEASE_TITLE="Release build ($GIT_TAG)" - is_prerelease="false" - else - RELEASE_NAME="continuous-$UPLOADTOOL_SUFFIX" - RELEASE_TITLE="Continuous build ($UPLOADTOOL_SUFFIX)" - if [ -z "$UPLOADTOOL_ISPRERELEASE" ] ; then - is_prerelease="false" - else - is_prerelease="true" - fi - - fi -else - # ,, is a bash-ism to convert variable to lower case - case $(tr '[:upper:]' '[:lower:]' <<< "$GIT_TAG") in - "") - # Do not use "latest" as it is reserved by GitHub - RELEASE_NAME="continuous" - RELEASE_TITLE="Continuous build" - if [ -z "$UPLOADTOOL_ISPRERELEASE" ] ; then - is_prerelease="false" - else - is_prerelease="true" - fi - ;; - *-alpha*|*-beta*|*-rc*) - RELEASE_NAME="$GIT_TAG" - RELEASE_TITLE="Pre-release build ($GIT_TAG)" - is_prerelease="true" - ;; - *) - RELEASE_NAME="$GIT_TAG" - RELEASE_TITLE="Release build ($GIT_TAG)" - is_prerelease="false" - ;; - esac -fi - -if [ "$ARTIFACTORY_BASE_URL" != "" ]; then - echo "ARTIFACTORY_BASE_URL set, trying to upload to artifactory" - - if [ "$ARTIFACTORY_API_KEY" == "" ]; then - echo "Please set ARTIFACTORY_API_KEY" - exit 1 - fi - - files="$@" - - # artifactory doesn't support any kind of "artifact description", so we're uploading a text file containing the - # relevant details along with the other artifacts - tempdir=$(mktemp -d) - info_file="$tempdir"/build-info.txt - echo "Travis CI build log: ${TRAVIS_BUILD_WEB_URL}" > "$info_file" - files+=("$info_file") - - set +x - - for file in ${files[@]}; do - url="${ARTIFACTORY_BASE_URL}/travis-${TRAVIS_BUILD_NUMBER}/"$(basename "$file") - md5sum=$(md5sum "$file" | cut -d' ' -f1) - sha1sum=$(sha1sum "$file" | cut -d' ' -f1) - sha256sum=$(sha256sum "$file" | cut -d' ' -f1) - echo "Uploading $file to $url" - hashsums=(-H "X-Checksum-Md5:$md5sum") - hashsums+=(-H "X-Checksum-Sha1:$sha1sum") - hashsums+=(-H "X-Checksum-Sha256:$sha256sum") - if ! curl -H 'X-JFrog-Art-Api:'"$ARTIFACTORY_API_KEY" "${hashsums[@]}" -T "$file" "$url"; then - echo "Failed to upload file, exiting" - rm -r "$tempdir" - exit 1 - fi - echo - echo "MD5 checksum: $md5sum" - echo "SHA1 checksum: $sha1sum" - echo "SHA256 checksum: $sha256sum" - done - rm -r "$tempdir" -fi - -# Do not upload non-master branch builds -# if [ "$GIT_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi -if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] ; then - echo "Release uploading disabled for pull requests" - if [ "$ARTIFACTORY_BASE_URL" != "" ]; then - echo "Releases have already been uploaded to Artifactory, exiting" - exit 0 - else - echo "Release uploading disabled for pull requests, uploading to transfersh.com instead" - rm -f ./uploaded-to - for FILE in "$@" ; do - BASENAME="$(basename "${FILE}")" - curl --upload-file $FILE "https://transfersh.com/$BASENAME" > ./one-upload - echo "$(cat ./one-upload)" # this way we get a newline - echo -n "$(cat ./one-upload)\\n" >> ./uploaded-to # this way we get a \n but no newline - done - fi -# review_url="https://api.github.com/repos/${GIT_REPO_SLUG}/pulls/${TRAVIS_PULL_REQUEST}/reviews" -# if [ -z $UPLOADTOOL_PR_BODY ] ; then -# body="Travis CI has created build artifacts for this PR here:" -# else -# body="$UPLOADTOOL_PR_BODY" -# fi -# body="$body\n$(cat ./uploaded-to)\nThe link(s) will expire 14 days from now." -# review_comment=$(curl -X POST \ -# --header "Authorization: token ${GITHUB_TOKEN}" \ -# --data '{"commit_id": "'"$GIT_COMMIT"'","body": "'"$body"'","event": "COMMENT"}' \ -# $review_url) -# if echo $review_comment | grep -q "Bad credentials" 2>/dev/null ; then -# echo '"Bad credentials" response for --data {"commit_id": "'"$GIT_COMMIT"'","body": "'"$body"'","event": "COMMENT"}' -# fi - $shatool "$@" - exit 0 -fi - -if [ ! -z "$TRAVIS_REPO_SLUG" ] ; then - echo "Running on Travis CI" - echo "TRAVIS_COMMIT: $TRAVIS_COMMIT" - if [ -z "$GITHUB_TOKEN" ] ; then - echo "\$GITHUB_TOKEN missing, please set it in the Travis CI settings of this project" - echo "You can get one from https://github.com/settings/tokens" - exit 1 - fi -elif [ ! -z "$GITHUB_ACTIONS" ] ; then - echo "Running on GitHub Actions" - if [ -z "$GITHUB_TOKEN" ] ; then - echo "\$GITHUB_TOKEN missing, please add the following to your run action:" - echo "env:" - echo " GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}" - exit 1 - fi -else - echo "Not running on known CI" - if [ -z "$GIT_REPO_SLUG" ] ; then - read -r -p "Repo Slug (GitHub and Travis CI username/reponame): " GIT_REPO_SLUG - fi - if [ -z "$GITHUB_TOKEN" ] ; then - read -r -s -p "Token (https://github.com/settings/tokens): " GITHUB_TOKEN - fi -fi - -tag_url="https://api.github.com/repos/$GIT_REPO_SLUG/git/refs/tags/$RELEASE_NAME" -tag_infos=$(curl -XGET --header "Authorization: token ${GITHUB_TOKEN}" "${tag_url}") -echo "tag_infos: $tag_infos" -tag_sha=$(echo "$tag_infos" | grep '"sha":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1) -echo "tag_sha: $tag_sha" - -release_url="https://api.github.com/repos/$GIT_REPO_SLUG/releases/tags/$RELEASE_NAME" -echo "Getting the release ID..." -echo "release_url: $release_url" -release_infos=$(curl -XGET --header "Authorization: token ${GITHUB_TOKEN}" "${release_url}") -echo "release_infos: $release_infos" -release_id=$(echo "$release_infos" | grep "\"id\":" | head -n 1 | tr -s " " | cut -f 3 -d" " | cut -f 1 -d ",") -echo "release ID: $release_id" -upload_url=$(echo "$release_infos" | grep '"upload_url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1) -echo "upload_url: $upload_url" -release_url=$(echo "$release_infos" | grep '"url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1) -echo "release_url: $release_url" -target_commit_sha=$(echo "$release_infos" | grep '"target_commitish":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1) -echo "target_commit_sha: $target_commit_sha" - -if [ "$GIT_COMMIT" != "$target_commit_sha" ] ; then - - echo "GIT_COMMIT != target_commit_sha, hence deleting $RELEASE_NAME..." - - if [ ! -z "$release_id" ]; then - delete_url="https://api.github.com/repos/$GIT_REPO_SLUG/releases/$release_id" - echo "Delete the release..." - echo "delete_url: $delete_url" - curl -XDELETE \ - --header "Authorization: token ${GITHUB_TOKEN}" \ - "${delete_url}" - fi - - # echo "Checking if release with the same name is still there..." - # echo "release_url: $release_url" - # curl -XGET --header "Authorization: token ${GITHUB_TOKEN}" \ - # "$release_url" - - if [ "$RELEASE_NAME" == "continuous" ] ; then - # if this is a continuous build tag, then delete the old tag - # in preparation for the new release - echo "Delete the tag..." - delete_url="https://api.github.com/repos/$GIT_REPO_SLUG/git/refs/tags/$RELEASE_NAME" - echo "delete_url: $delete_url" - curl -XDELETE \ - --header "Authorization: token ${GITHUB_TOKEN}" \ - "${delete_url}" - fi - - echo "Create release..." - - release_infos=$(curl -H "Authorization: token ${GITHUB_TOKEN}" \ - --data '{"tag_name": "'"$RELEASE_NAME"'","target_commitish": "'"$GIT_COMMIT"'","name": "'"$RELEASE_TITLE"'","body": "'"$RELEASE_BODY"'","draft": false,"prerelease": '$is_prerelease'}' "https://api.github.com/repos/$GIT_REPO_SLUG/releases") - - echo "$release_infos" - - unset upload_url - upload_url=$(echo "$release_infos" | grep '"upload_url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1) - echo "upload_url: $upload_url" - - unset release_url - release_url=$(echo "$release_infos" | grep '"url":' | head -n 1 | cut -d '"' -f 4 | cut -d '{' -f 1) - echo "release_url: $release_url" - -fi # if [ "$GIT_COMMIT" != "$tag_sha" ] - -if [ -z "$release_url" ] ; then - echo "Cannot figure out the release URL for $RELEASE_NAME" - exit 1 -fi - -echo "Upload binaries to the release..." - -# Need to URL encode the basename, so we have this function to do so -urlencode() { - # urlencode - old_lc_collate=$LC_COLLATE - LC_COLLATE=C - local length="${#1}" - for (( i = 0; i < length; i++ )); do - local c="${1:$i:1}" - case $c in - [a-zA-Z0-9.~_-]) printf '%s' "$c" ;; - *) printf '%%%02X' "'$c" ;; - esac - done - LC_COLLATE=$old_lc_collate -} - -for FILE in "$@" ; do - FULLNAME="${FILE}" - BASENAME="$(basename "${FILE}")" - curl -H "Authorization: token ${GITHUB_TOKEN}" \ - -H "Accept: application/vnd.github.manifold-preview" \ - -H "Content-Type: application/octet-stream" \ - --data-binary "@$FULLNAME" \ - "$upload_url?name=$(urlencode "$BASENAME")" - echo "" -done - -$shatool "$@" - -if [ "$GIT_COMMIT" != "$tag_sha" ] ; then - echo "Publish the release..." - - release_infos=$(curl -H "Authorization: token ${GITHUB_TOKEN}" \ - --data '{"draft": false}' "$release_url") - - echo "$release_infos" -fi # if [ "$GIT_COMMIT" != "$tag_sha" ] diff --git a/coders/dng.c b/coders/dng.c index 47378c1c5..bc651c10d 100644 --- a/coders/dng.c +++ b/coders/dng.c @@ -291,7 +291,7 @@ static Image *InvokeDNGDelegate(const ImageInfo *image_info,Image *image, (void) FormatLocaleString(property,MagickPathExtent,"dng:%s", tag); content=ConstantString(GetXMLTreeContent(next)); - StripString(content); + (void) StripMagickString(content); if ((LocaleCompare(tag,"log") != 0) && (LocaleCompare(tag,"InputFilename") != 0) && (LocaleCompare(tag,"OutputFilename") != 0) && diff --git a/coders/gif.c b/coders/gif.c index f6b952b39..1301aa1df 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -1726,6 +1726,29 @@ static MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image, (void) WriteBlobByte(image,(unsigned char) (opacity >= 0 ? opacity : 0)); (void) WriteBlobByte(image,(unsigned char) 0x00); + if ((image->gamma != 1.0f/2.2f)) + { + char + attributes[MagickPathExtent]; + + ssize_t + count; + + /* + Write ImageMagick extension. + */ + (void) LogMagickEvent(CoderEvent,GetMagickModule(), + " Writing GIF Extension %s","ImageMagick"); + (void) WriteBlobByte(image,(unsigned char) 0x21); + (void) WriteBlobByte(image,(unsigned char) 0xff); + (void) WriteBlobByte(image,(unsigned char) 0x0b); + (void) WriteBlob(image,11,(unsigned char *) "ImageMagick"); + count=FormatLocaleString(attributes,MagickPathExtent,"gamma=%g", + image->gamma); + (void) WriteBlobByte(image,(unsigned char) count); + (void) WriteBlob(image,(size_t) count,(unsigned char *) attributes); + (void) WriteBlobByte(image,(unsigned char) 0x00); + } value=GetImageProperty(image,"comment",exception); if (value != (const char *) NULL) { @@ -1768,29 +1791,6 @@ static MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image, image->iterations-1 : 0)); (void) WriteBlobByte(image,(unsigned char) 0x00); } - if ((image->gamma != 1.0f/2.2f)) - { - char - attributes[MagickPathExtent]; - - ssize_t - count; - - /* - Write ImageMagick extension. - */ - (void) LogMagickEvent(CoderEvent,GetMagickModule(), - " Writing GIF Extension %s","ImageMagick"); - (void) WriteBlobByte(image,(unsigned char) 0x21); - (void) WriteBlobByte(image,(unsigned char) 0xff); - (void) WriteBlobByte(image,(unsigned char) 0x0b); - (void) WriteBlob(image,11,(unsigned char *) "ImageMagick"); - count=FormatLocaleString(attributes,MagickPathExtent,"gamma=%g", - image->gamma); - (void) WriteBlobByte(image,(unsigned char) count); - (void) WriteBlob(image,(size_t) count,(unsigned char *) attributes); - (void) WriteBlobByte(image,(unsigned char) 0x00); - } ResetImageProfileIterator(image); for ( ; ; ) { diff --git a/coders/icon.c b/coders/icon.c index 2ccbc82b1..bf21180bd 100644 --- a/coders/icon.c +++ b/coders/icon.c @@ -819,7 +819,7 @@ static Image *AutoResizeImage(const Image *image,const char *option, i; size_t - sizes[MAX_SIZES] ={ 256, 192, 128, 96, 64, 48, 40, 32, 24, 16}; + sizes[MAX_SIZES]={256, 192, 128, 96, 64, 48, 40, 32, 24, 16}; images=NULL; *count=0; diff --git a/coders/jxl.c b/coders/jxl.c index 7e760f73a..34a38e31d 100644 --- a/coders/jxl.c +++ b/coders/jxl.c @@ -254,7 +254,7 @@ static Image *ReadJXLImage(const ImageInfo *image_info,ExceptionInfo *exception) if (runner == (void *) NULL) { JxlDecoderDestroy(decoder); - ThrowWriterException(CoderError,"MemoryAllocationFailed"); + ThrowReaderException(CoderError,"MemoryAllocationFailed"); } decoder_status=JxlDecoderSetParallelRunner(decoder,JxlThreadParallelRunner, runner); @@ -262,7 +262,7 @@ static Image *ReadJXLImage(const ImageInfo *image_info,ExceptionInfo *exception) { JxlThreadParallelRunnerDestroy(runner); JxlDecoderDestroy(decoder); - ThrowWriterException(CoderError,"MemoryAllocationFailed"); + ThrowReaderException(CoderError,"MemoryAllocationFailed"); } events_wanted=JXL_DEC_BASIC_INFO; if (image_info->ping == MagickFalse) diff --git a/coders/msl.c b/coders/msl.c index c6acb7ddb..9fd2ddeed 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -7391,7 +7391,7 @@ static void MSLEndElement(void *context,const xmlChar *tag) (void) DeleteImageProperty(msl_info->image[n],"comment"); if (msl_info->content == (char *) NULL) break; - StripString(msl_info->content); + (void) StripMagickString(msl_info->content); (void) SetImageProperty(msl_info->image[n],"comment", msl_info->content,msl_info->exception); break; @@ -7438,7 +7438,7 @@ static void MSLEndElement(void *context,const xmlChar *tag) (void) DeleteImageProperty(msl_info->image[n],"label"); if (msl_info->content == (char *) NULL) break; - StripString(msl_info->content); + (void) StripMagickString(msl_info->content); (void) SetImageProperty(msl_info->image[n],"label", msl_info->content,msl_info->exception); break; diff --git a/coders/pdf.c b/coders/pdf.c index 580a2abc5..746d333c2 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -722,13 +722,6 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) (void) CopyMagickString(pdf_image->filename,filename,MagickPathExtent); (void) CopyMagickString(pdf_image->magick,image->magick,MagickPathExtent); pdf_image->page=page; - if (image_info->ping != MagickFalse) - { - pdf_image->magick_columns*=image->resolution.x/2.0; - pdf_image->magick_rows*=image->resolution.y/2.0; - pdf_image->columns*=image->resolution.x/2.0; - pdf_image->rows*=image->resolution.y/2.0; - } (void) CloneImageProfiles(pdf_image,image); (void) CloneImageProperties(pdf_image,image); next=SyncNextImageInList(pdf_image); @@ -1195,6 +1188,69 @@ static const char *GetPDFTitle(const ImageInfo *image_info, return(default_title); } +static const StringInfo* GetCompatibleColorProfile(const Image* image) +{ + ColorspaceType + colorspace; + + const StringInfo + *icc_profile; + + colorspace=UndefinedColorspace; + icc_profile=GetImageProfile(image,"icc"); + if (icc_profile == (const StringInfo *) NULL) + return((const StringInfo *) NULL); + if (GetStringInfoLength(icc_profile) > 20) + { + const char + *p; + + unsigned int + value; + + p=(const char *) GetStringInfoDatum(icc_profile)+16; + value=(unsigned int) (*p++) << 24; + value|=(unsigned int) (*p++) << 16; + value|=(unsigned int) (*p++) << 8; + value|=(unsigned int) *p; + switch (value) + { + case 0x58595a20: + colorspace=XYZColorspace; + break; + case 0x4c616220: + colorspace=LabColorspace; + break; + case 0x4c757620: + colorspace=LuvColorspace; + break; + case 0x59436272: + colorspace=YCbCrColorspace; + break; + case 0x52474220: + if ((image->colorspace == sRGBColorspace) || + (image->colorspace == RGBColorspace)) + return(icc_profile); + break; + case 0x47524159: + colorspace=GRAYColorspace; + break; + case 0x48535620: + colorspace=HSVColorspace; + break; + case 0x434D594B: + colorspace=CMYKColorspace; + break; + case 0x434D5920: + colorspace=CMYColorspace; + break; + } + } + if (image->colorspace == colorspace) + return(icc_profile); + return((const StringInfo *) NULL); +} + static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { @@ -1259,7 +1315,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, *value; const StringInfo - *profile; + *icc_profile; double pointsize, @@ -1365,8 +1421,8 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, for (next=image; next != (Image *) NULL; next=GetNextImageInList(next)) { (void) SetImageGray(next,exception); - profile=GetImageProfile(next,"icc"); - if (profile != (StringInfo *) NULL) + icc_profile=GetCompatibleColorProfile(next); + if (icc_profile != (StringInfo *) NULL) { (void) SetImageStorageClass(next,DirectClass,exception); version=1.7; @@ -1494,8 +1550,8 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, for ( ; GetNextImageInList(kid_image) != (Image *) NULL; count+=ObjectsPerImage) { page_count++; - profile=GetImageProfile(kid_image,"icc"); - if (profile != (StringInfo *) NULL) + icc_profile=GetCompatibleColorProfile(kid_image); + if (icc_profile != (StringInfo *) NULL) count+=2; (void) FormatLocaleString(buffer,MagickPathExtent,"%.20g 0 R ",(double) count); @@ -1521,11 +1577,9 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, *tile_image; MagickBooleanType - has_icc_profile, thumbnail; - profile=GetImageProfile(image,"icc"); - has_icc_profile=profile != (StringInfo *) NULL ? MagickTrue : MagickFalse; + icc_profile=GetCompatibleColorProfile(image); compression=image->compression; if (image_info->compression != UndefinedCompression) compression=image_info->compression; @@ -1696,7 +1750,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, (double) object+1); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent,"/Thumb %.20g 0 R\n", - (double) object+(has_icc_profile != MagickFalse ? 10 : 8)); + (double) object+(icc_profile != (StringInfo *) NULL ? 10 : 8)); (void) WriteBlobString(image,buffer); (void) WriteBlobString(image,">>\n"); (void) WriteBlobString(image,"endobj\n"); @@ -1879,7 +1933,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, if (image->alpha_trait != UndefinedPixelTrait) { (void) FormatLocaleString(buffer,MagickPathExtent,"/SMask %.20g 0 R\n", - (double) object+(has_icc_profile != MagickFalse ? 9 : 7)); + (double) object+(icc_profile != (StringInfo *) NULL ? 9 : 7)); (void) WriteBlobString(image,buffer); } (void) FormatLocaleString(buffer,MagickPathExtent,"/Length %.20g 0 R\n", @@ -2270,7 +2324,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, device="DeviceRGB"; channels=3; } - if (has_icc_profile == MagickFalse) + if (icc_profile == (StringInfo *) NULL) { if (channels != 0) (void) FormatLocaleString(buffer,MagickPathExtent,"/%s\n",device); @@ -2302,8 +2356,8 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, (void) WriteBlobString(image,buffer); offset=TellBlob(image); Ascii85Initialize(image); - p=GetStringInfoDatum(profile); - for (i=0; i < (ssize_t) GetStringInfoLength(profile); i++) + p=GetStringInfoDatum(icc_profile); + for (i=0; i < (ssize_t) GetStringInfoLength(icc_profile); i++) Ascii85Encode(image,(unsigned char) *p++); Ascii85Flush(image); offset=TellBlob(image)-offset; @@ -2405,7 +2459,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image, (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent, "/ColorSpace %.20g 0 R\n",(double) object- - (has_icc_profile != MagickFalse ? 3 : 1)); + (icc_profile != (StringInfo *) NULL ? 3 : 1)); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent, "/BitsPerComponent %d\n",(compression == FaxCompression) || diff --git a/coders/ps.c b/coders/ps.c index 5fa8f8caf..ec4c3ce01 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -393,7 +393,7 @@ static void ReadPSInfo(const ImageInfo *image_info,Image *image, value=ConstantString(name); (void) SubstituteString(&value,"(",""); (void) SubstituteString(&value,")",""); - (void) StripString(value); + (void) StripMagickString(value); if (*value != '\0') (void) SetImageProperty(image,property,value,exception); value=DestroyString(value); @@ -867,13 +867,6 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) if (info.rows != 0) postscript_image->magick_rows=info.rows; postscript_image->page=page; - if (image_info->ping != MagickFalse) - { - postscript_image->magick_columns*=image->resolution.x/2.0; - postscript_image->magick_rows*=image->resolution.y/2.0; - postscript_image->columns*=image->resolution.x/2.0; - postscript_image->rows*=image->resolution.y/2.0; - } (void) CloneImageProfiles(postscript_image,image); (void) CloneImageProperties(postscript_image,image); next=SyncNextImageInList(postscript_image); diff --git a/coders/tiff.c b/coders/tiff.c index bce972660..a13e71ac3 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -801,14 +801,14 @@ static MagickBooleanType TIFFSetImageProperties(TIFF *tiff,Image *image, property[MagickPathExtent], value[MagickPathExtent]; - StripString(buffer); + (void) StripMagickString(buffer); p=strchr(buffer,':'); if (p == (char *) NULL) continue; *p='\0'; (void) sprintf(property,"%s%.1024s",tag,buffer); (void) sprintf(value,"%s",p+1); - StripString(value); + (void) StripMagickString(value); (void) SetImageProperty(image,property,value,exception); } (void) fclose(file); @@ -1474,7 +1474,9 @@ static Image *ReadTIFFImage(const ImageInfo *image_info, image->colorspace=CMYKColorspace; if (photometric == PHOTOMETRIC_CIELAB) image->colorspace=LabColorspace; - if ((photometric == PHOTOMETRIC_YCBCR) && (compress_tag != COMPRESSION_JPEG)) + if ((photometric == PHOTOMETRIC_YCBCR) && + (compress_tag != COMPRESSION_OJPEG) && + (compress_tag != COMPRESSION_JPEG)) image->colorspace=YCbCrColorspace; status=TIFFGetProfiles(tiff,image,exception); if (status == MagickFalse) diff --git a/coders/xpm.c b/coders/xpm.c index 454d6aa10..85b152353 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -432,7 +432,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception) if (q != (char *) NULL) *q='\0'; } - StripString(target); + (void) StripMagickString(target); if (*symbolic != '\0') (void) AddValueToSplayTree(xpm_symbolic,ConstantString(target), ConstantString(symbolic)); diff --git a/coders/xps.c b/coders/xps.c index 9471cd4fd..22724e660 100644 --- a/coders/xps.c +++ b/coders/xps.c @@ -387,13 +387,6 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception) (void) CopyMagickString(postscript_image->magick,image->magick, MagickPathExtent); postscript_image->page=page; - if (image_info->ping != MagickFalse) - { - postscript_image->magick_columns*=image->resolution.x/2.0; - postscript_image->magick_rows*=image->resolution.y/2.0; - postscript_image->columns*=image->resolution.x/2.0; - postscript_image->rows*=image->resolution.y/2.0; - } (void) CloneImageProfiles(postscript_image,image); (void) CloneImageProperties(postscript_image,image); next=SyncNextImageInList(postscript_image); diff --git a/configure b/configure index 8964c8c8f..a7a399d78 100755 --- a/configure +++ b/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.0.11-14. +# Generated by GNU Autoconf 2.69 for ImageMagick 7.1.0-0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ImageMagick' PACKAGE_TARNAME='ImageMagick' -PACKAGE_VERSION='7.0.11-14' -PACKAGE_STRING='ImageMagick 7.0.11-14' +PACKAGE_VERSION='7.1.0-0' +PACKAGE_STRING='ImageMagick 7.1.0-0' PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues' PACKAGE_URL='https://imagemagick.org' @@ -1856,7 +1856,7 @@ if test "$ac_init_help" = "long"; then # 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.0.11-14 to adapt to many kinds of systems. +\`configure' configures ImageMagick 7.1.0-0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1932,7 +1932,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ImageMagick 7.0.11-14:";; + short | recursive ) echo "Configuration of ImageMagick 7.1.0-0:";; esac cat <<\_ACEOF @@ -2228,7 +2228,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ImageMagick configure 7.0.11-14 +ImageMagick configure 7.1.0-0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3279,7 +3279,7 @@ cat >config.log <<_ACEOF 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.0.11-14, which was +It was created by ImageMagick $as_me 7.1.0-0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4267,7 +4267,7 @@ fi # Define the identity of the package. PACKAGE='ImageMagick' - VERSION='7.0.11-14' + VERSION='7.1.0-0' # Some tools Automake needs. @@ -4556,15 +4556,15 @@ _ACEOF # Substitute versioning MAGICK_MAJOR_VERSION=7 -MAGICK_MINOR_VERSION=0 +MAGICK_MINOR_VERSION=1 -MAGICK_MICRO_VERSION=11 +MAGICK_MICRO_VERSION=0 -MAGICK_PATCHLEVEL_VERSION=14 +MAGICK_PATCHLEVEL_VERSION=0 -MAGICK_VERSION=7.0.11-14 +MAGICK_VERSION=7.1.0-0 -MAGICK_GIT_REVISION=18769:2027731ae:20210530 +MAGICK_GIT_REVISION=18793:220b52472:20210611 # Substitute library versioning @@ -4584,17 +4584,17 @@ MAGICKPP_LIBRARY_CURRENT_MIN=`expr $MAGICKPP_LIBRARY_CURRENT - $MAGICKPP_LIBRARY MAGICKPP_LIBRARY_VERSION_INFO=$MAGICKPP_LIBRARY_CURRENT:$MAGICKPP_LIBRARY_REVISION:$MAGICKPP_LIBRARY_AGE -PACKAGE_BASE_VERSION=7.0.11 +PACKAGE_BASE_VERSION=7.1.0 -PACKAGE_PATCHLEVEL_VERSION=14 +PACKAGE_PATCHLEVEL_VERSION=0 -PACKAGE_VERSION_ADDENDUM=-14 +PACKAGE_VERSION_ADDENDUM=-0 -PACKAGE_LIB_VERSION=0x70B +PACKAGE_LIB_VERSION=0x710 -PACKAGE_LIB_VERSION_NUMBER=7,0,11,14 +PACKAGE_LIB_VERSION_NUMBER=7,1,0,0 -PACKAGE_RELEASE_DATE=2021-05-17 +PACKAGE_RELEASE_DATE=2021-06-02 # Ensure that make can run correctly @@ -36864,7 +36864,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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.0.11-14, which was +This file was extended by ImageMagick $as_me 7.1.0-0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -36931,7 +36931,7 @@ _ACEOF 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.0.11-14 +ImageMagick config.status 7.1.0-0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/filters/analyze.c b/filters/analyze.c index d0ad5bfd2..615231d4a 100644 --- a/filters/analyze.c +++ b/filters/analyze.c @@ -91,6 +91,7 @@ typedef struct _StatisticsInfo skewness; } StatisticsInfo; +#if defined(MAGICKCORE_OPENMP_SUPPORT) static inline int GetMagickNumberThreads(const Image *source, const Image *destination,const size_t chunk,int multithreaded) { @@ -112,6 +113,7 @@ static inline int GetMagickNumberThreads(const Image *source, return(MagickMax(MagickMin((ssize_t) GetMagickResourceLimit(ThreadResource), (ssize_t) (chunk)/64),1)); } +#endif ModuleExport size_t analyzeImage(Image **images,const int argc, const char **argv,ExceptionInfo *exception) diff --git a/m4/version.m4 b/m4/version.m4 index 86f1bcca6..9d4c3d450 100644 --- a/m4/version.m4 +++ b/m4/version.m4 @@ -25,13 +25,13 @@ # m4_define([magick_name], [ImageMagick]) m4_define([magick_major_version], [7]) -m4_define([magick_minor_version], [0]) -m4_define([magick_micro_version], [11]) -m4_define([magick_patchlevel_version], [14]) +m4_define([magick_minor_version], [1]) +m4_define([magick_micro_version], [0]) +m4_define([magick_patchlevel_version], [0]) m4_define([magick_bugreport], [https://github.com/ImageMagick/ImageMagick/issues]) m4_define([magick_url], [https://imagemagick.org]) -m4_define([magick_lib_version], [0x70B]) +m4_define([magick_lib_version], [0x710]) m4_define([magick_tarname],[ImageMagick]) # diff --git a/www/magick-cache.html b/www/magick-cache.html new file mode 100644 index 000000000..e69de29bb