[-]
[+]
|
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.4+obs1.1</param>
+ <param name="revision">7.1.0.8+obs1.1</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Added |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.editorconfig
^
|
@@ -0,0 +1,10 @@
+root = true
+
+[*.{c,h,txt,md,yml}]
+
+indent_size = 2
+indent_style = space
+tab_width = 2
+
+insert_final_newline = true
+trim_trailing_whitespace = true
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/CONTRIBUTING.md
^
|
@@ -10,8 +10,7 @@
- Open a new pull request with the patch and follow the instructions from the pull request template.
- Before submitting, please ensure that your code matches the existing coding patterns and practise as demonstrated in the repository.
-- Once the pull request has been accepted for the master (IM7) branch, please submit another patch for the
- [ImageMagick-6](https://github.com/ImageMagick/ImageMagick/tree/ImageMagick-6) branch when applicable.
+- Once the pull request has been accepted, please submit another patch to the [ImageMagick6](https://github.com/ImageMagick/ImageMagick6) legacy repository when applicable.
#### **Do you intend to add a new feature?**
@@ -21,6 +20,6 @@
- Please submit a pull request in our [website repository](https://github.com/ImageMagick/Website) instead.
-If you cannot help us by writing code, then take a look at the other ways you could [help](https://imagemagick.org/script/support.php) the ImageMagick team.
+If you cannot help us by writing code, take a look at the other ways you could [help](https://imagemagick.org/script/support.php) the ImageMagick team.
\- The Wizards
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/ISSUE_TEMPLATE/bug-report.yml
^
|
@@ -37,4 +37,4 @@
- type: textarea
attributes:
label: Images
- description: Please upload images that can be used to reproduce issues in the area below. If the file type is not supported the file can be zipped and then uploaded instead.
\ No newline at end of file
+ description: Please upload images that can be used to reproduce issues in the area below. If the file type is not supported the file can be zipped and then uploaded instead.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/ISSUE_TEMPLATE/config.yml
^
|
@@ -2,4 +2,4 @@
contact_links:
- name: Ask question
url: https://github.com/ImageMagick/ImageMagick/discussions/category_choices
- about: Ask a question about this project.
\ No newline at end of file
+ about: Ask a question about this project.
|
[-]
[+]
|
Added |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/ISSUE_TEMPLATE/feature-request.yml
^
|
@@ -0,0 +1,21 @@
+name: Feature request
+description: Suggest an idea for this project
+body:
+- type: textarea
+ attributes:
+ label: Is your feature request related to a problem? Please describe.
+ description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+- type: textarea
+ attributes:
+ label: Describe the solution you'd like
+ description: A clear and concise description of what you want to happen.
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Describe alternatives you've considered
+ description: A clear and concise description of any alternative solutions or features you've considered.
+- type: textarea
+ attributes:
+ label: Additional context
+ description: Add any other context or screenshots about the feature request here.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/workflows/app-image.yml
^
|
@@ -27,7 +27,7 @@
run: |
set -e
apt-get update -y
- apt-get install -y autoconf curl fuse git kmod libbz2-dev libdjvulibre-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev liblcms-dev libopenexr-dev libturbojpeg0-dev liblqr-dev libraqm-dev libtiff-dev libx11-dev libxml2-dev liblzma-dev software-properties-common wget
+ apt-get install -y autoconf curl fuse git kmod libbz2-dev libdjvulibre-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev liblcms-dev libopenexr-dev libturbojpeg0-dev liblqr-dev libraqm-dev libtiff-dev libwebp-dev libx11-dev libxml2-dev liblzma-dev software-properties-common wget
add-apt-repository ppa:git-core/ppa -y
apt-get install -y git
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/workflows/daily.yml
^
|
@@ -102,8 +102,7 @@
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
- devenv /upgrade configure.vcxproj
- msbuild configure.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
+ msbuild configure.2019.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
- name: Configure ImageMagick
shell: cmd
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/workflows/main.yml
^
|
@@ -98,8 +98,7 @@
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
- devenv /upgrade configure.vcxproj
- msbuild configure.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
+ msbuild configure.2019.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
- name: Configure ImageMagick
shell: cmd
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/.github/workflows/release.yml
^
|
@@ -75,8 +75,7 @@
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
- devenv /upgrade configure.vcxproj
- msbuild configure.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
+ msbuild configure.2019.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
- name: Configure ImageMagick
shell: cmd
@@ -121,7 +120,7 @@
with:
certificate: '${{ secrets.CERTIFICATE }}'
folder: 'ImageMagick-Windows\VisualMagick\installer\output'
-
+
- uses: actions/upload-artifact@v2
with:
name: installers
@@ -150,7 +149,7 @@
run: |
cd %GITHUB_WORKSPACE%\ImageMagick-Windows
7z a ImageMagick-Windows.7z .\source\*
-
+
- uses: actions/upload-artifact@v2
with:
name: ImageMagick-Windows
@@ -204,8 +203,7 @@
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
- devenv /upgrade configure.vcxproj
- msbuild configure.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
+ msbuild configure.2019.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
- name: Configure ImageMagick
shell: cmd
@@ -261,4 +259,4 @@
- uses: actions/upload-artifact@v2
with:
name: 'ImageMagick-${{steps.package.outputs.version}}-portable-${{matrix.quantum}}${{matrix.hdri_flag}}-${{matrix.platform}}'
- path: portable
\ No newline at end of file
+ path: portable
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/ChangeLog
^
|
@@ -1,8 +1,47 @@
+2021-09-18 7.1.0-8 <quetzlzacatenango@image...>
+ * Release ImageMagick version 7.1.0-8 GIT revision 19115:428fe1921:20210918
+
+2021-09-17 7.1.0-8 Dirk Lemstra <dirk@lem.....org>
+ * Check for `null` in InvokeDelegate() (reference
+ https://github.com/ImageMagick/ImageMagick/issues/4225).
+
+2021-09-12 7.1.0-7 <quetzlzacatenango@image...>
+ * Release ImageMagick version 7.1.0-7 GIT revision 19095:d368d3c6b:20210912
+
+2021-09-11 7.1.0-7 Dirk Lemstra <dirk@lem.....org>
+ * Fixed incorrect check when module is used as the domain in policy.xml
+ that could allow the use of a disabled module. (reference
+ https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qvhr-jj4p-j2qr).
+
+2021-09-06 7.1.0-7 <quetzlzacatenango@image...>
+ * Prevent color reduction merging into one color (reference
+ https://github.com/ImageMagick/ImageMagick/issues/4059)
+
+2021-09-04 7.1.0-6 <quetzlzacatenango@image...>
+ * Release ImageMagick version 7.1.0-6 GIT revision 19033:7c589e780:20210904
+
+2021-08-21 7.1.0-6 <quetzlzacatenango@image...>
+ * Tweak the bilevel image type (reference
+ https://github.com/ImageMagick/ImageMagick/issues/4121).
+ * Converting from LAB to RGB leads to wrong colors (reference
+ https://github.com/ImageMagick/ImageMagick/issues/4105).
+
+2021-08-21 7.1.0-5 <quetzlzacatenango@image...>
+ * Release ImageMagick version 7.1.0-5 GIT revision 18995:8f77c3c9c:20210821
+
+2021-08-12 7.1.0-5 Dirk Lemstra <dirk@lem.....org>
+ * Added option (-dng:read-thumbnail=true) to read the thumbnail of a raw
+ Image and store it as a profile called dng:thumbnail.
+
+2021-07-26 7.1.0-5 <quetzlzacatenango@image...>
+ * Heap-based buffer overflow in TIFF coder (alert from Hunter Mitchell).
+ * Grayscale image write optimization.
+
2021-07-18 7.1.0-4 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-4 GIT revision 18926:8eb9c6c48:20210718
2021-07-17 7.1.0-4 <quetzlzacatenango@image...>
- * trim no longer returns an empty image on 1-pixel width input (reference
+ * Trim no longer returns an empty image on 1-pixel width input (reference
https://github.com/ImageMagick/ImageMagick/issues/3896).
* remove virtual canvas offset from difference image.
@@ -10,12 +49,12 @@
* Release ImageMagick version 7.1.0-3 GIT revision 18901:692e6e059:20210717
2021-07-03 7.1.0-3 Dirk Lemstra <dirk@lem.....org>
- * Added option to set the pixel format option of ffmpeg when reading a
- video file with -define video:pixel-format=<value>.
+ * Added option to set the pixel format option of ffmpeg when reading or
+ writing a video file with -define video:pixel-format=<value>.
2021-06-26 7.1.0-3 <quetzlzacatenango@image...>
* system() is not supported under IOS.
- * accelerate subimage-search with FFT's (contributed by Fred).
+ * Accelerate subimage-search with FFT's (contributed by Fred).
2021-06-25 7.1.0-2 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-2 GIT revision 18831:601356f1d:20210625
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/Install-windows.txt
^
|
@@ -1,49 +1,2 @@
-This document describes the requirements and instructions to build ImageMagick
-for Windows on your own machine.
-
-Requirements
-
- o Visual Studio 2013 (or newer)
- o Git for Windows
- o AMD APP SDK (optional
- for OpenCL support)
-
-Install Visual Studio dependencies
-
-To build ImageMagick with Visual Studio the following components should
-be installed:
-
- o Desktop development with C++ (workload)
- o Visual C++ ATL for x86 and x64
- o Visual C++ MFC for x86 and x64
- o Windows XP support for C++ (optional if the output needs to run on Windows
- XP)
-
-Naming of these components might differ between version of Visual Studio. The
-example above use the Visual Studio 2017 names.
-
-Clone the dependencies
-
-The ImageMagick library is build with a number of third party libraries. Run
-CloneRepositories.cmd to clone these libraries and the ImageMagick library.
-
-Build configure.exe
-
-One of the folders that was created in the previous step is called VisualMagick
-and this folder contains a folder called configure. This folder contains a
-solution configure.sln. Open this solution with Visual Studio and start a
-Release build of the project. This will create a file called configure.exe in
-the folder. Running this program will start a Wizard that allows configuration
-of ImageMagick and its individual components.
-
-Build ImageMagick
-
-Depending on which options where chosen when running configure.exe one of
-the following solutions will be created in the VisualMagick folder:
-
- o VisualDynamicMT.sln (Dynamic Multi-threaded DLL runtimes)
- o VisualStaticMTD.sln (Static Multi-threaded DLL runtimes)
- o VisualStaticMT.sln (Static Multi-threaded runtimes)
-
-Open the solution to start building ImageMagick. The binaries will be created
-in the VisualMagick\bin folder.
+Instructions on how to build ImageMagick on Windows can be found here:
+https://github.com/ImageMagick/ImageMagick-Windows
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/Magick++/fuzz/encoder_list.cc
^
|
@@ -3,6 +3,7 @@
#include <algorithm>
#include <Magick++/Image.h>
+#include <Magick++/Functions.h>
#include <Magick++/STL.h>
static std::string getInitializer(const std::string magick_module)
@@ -15,6 +16,8 @@
}
int main() {
+ Magick::InitializeMagick((const char *) NULL);
+
std::list<Magick::CoderInfo> coderList;
coderInfoList(&coderList, Magick::CoderInfo::TrueMatch, Magick::CoderInfo::AnyMatch, Magick::CoderInfo::AnyMatch);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/Magick++/lib/Magick++/Image.h
^
|
@@ -516,9 +516,11 @@
// Image representation type (also see type operation)
// Available types:
- // Bilevel Grayscale GrayscaleMatte
- // Palette PaletteMatte TrueColor
- // TrueColorMatte ColorSeparation ColorSeparationMatte
+ // Bilevel PaletteBilevelAlpha
+ // Grayscale GrayscaleAlpha
+ // Palette PaletteAlpha
+ // TrueColor TrueColorAlpha
+ // ColorSeparation ColorSeparationAlpha
void type(const ImageType type_);
ImageType type(void) const;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/Magick++/lib/Magick++/Include.h
^
|
@@ -542,6 +542,7 @@
using MagickCore::DXT1Compression;
using MagickCore::DXT3Compression;
using MagickCore::DXT5Compression;
+ using MagickCore::BC7Compression;
using MagickCore::FaxCompression;
using MagickCore::Group4Compression;
using MagickCore::JBIG1Compression;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/Magick++/lib/Magick++/STL.h
^
|
@@ -2122,6 +2122,9 @@
{
const MagickCore::MagickInfo *magick_info =
MagickCore::GetMagickInfo( coder_list[i], exceptionInfo );
+ if (!magick_info)
+ continue;
+
coder_list[i]=(char *)
MagickCore::RelinquishMagickMemory( coder_list[i] );
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/attribute.c
^
|
@@ -1727,6 +1727,9 @@
MagickExport ImageType IdentifyImageType(const Image *image,
ExceptionInfo *exception)
{
+ ImageType
+ type;
+
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
@@ -1737,14 +1740,10 @@
return(ColorSeparationType);
return(ColorSeparationAlphaType);
}
- if (IdentifyImageMonochrome(image,exception) != MagickFalse)
- return(BilevelType);
- if (IdentifyImageGray(image,exception) != UndefinedType)
- {
- if (image->alpha_trait != UndefinedPixelTrait)
- return(GrayscaleAlphaType);
- return(GrayscaleType);
- }
+ type=IdentifyImageGray(image,exception);
+ if ((type == BilevelType) || (type == GrayscaleType) ||
+ (type == GrayscaleAlphaType))
+ return(type);
if (IdentifyPaletteImage(image,exception) != MagickFalse)
{
if (image->alpha_trait != UndefinedPixelTrait)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/blob.c
^
|
@@ -2576,7 +2576,6 @@
assert(images->signature == MagickCoreSignature);
assert(image_info->custom_stream != (CustomStreamInfo *) NULL);
assert(image_info->custom_stream->signature == MagickCoreSignature);
- assert(image_info->custom_stream->reader != (CustomStreamHandler) NULL);
assert(image_info->custom_stream->writer != (CustomStreamHandler) NULL);
assert(exception != (ExceptionInfo *) NULL);
clone_info=CloneImageInfo(image_info);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/channel.c
^
|
@@ -992,6 +992,8 @@
{
case ActivateAlphaChannel:
{
+ if (image->alpha_trait == BlendPixelTrait)
+ return(status);
image->alpha_trait=BlendPixelTrait;
break;
}
@@ -1191,6 +1193,8 @@
}
case OffAlphaChannel:
{
+ if (image->alpha_trait == UndefinedPixelTrait)
+ return(status);
image->alpha_trait=UndefinedPixelTrait;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/colorspace-private.h
^
|
@@ -101,6 +101,14 @@
return(MagickFalse);
}
+static inline MagickBooleanType IsGrayImageType(const ImageType type)
+{
+ if ((type == GrayscaleType) || (type == GrayscaleAlphaType) ||
+ (type == BilevelType))
+ return(MagickTrue);
+ return(MagickFalse);
+}
+
static inline MagickBooleanType IsHueCompatibleColorspace(
const ColorspaceType colorspace)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/colorspace.c
^
|
@@ -1557,21 +1557,19 @@
MagickExport MagickBooleanType SetImageMonochrome(Image *image,
ExceptionInfo *exception)
{
- const char
- *value;
+ MagickBooleanType
+ is_bilevel;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- if (image->type == BilevelType)
+ if (IsImageMonochrome(image) != MagickFalse)
return(MagickTrue);
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
return(MagickFalse);
- value=GetImageProperty(image,"colorspace:auto-grayscale",exception);
- if (IsStringFalse(value) != MagickFalse)
- return(MagickFalse);
- if (IdentifyImageMonochrome(image,exception) == MagickFalse)
+ is_bilevel=IdentifyImageMonochrome(image,exception);
+ if (is_bilevel == MagickFalse)
return(MagickFalse);
image->colorspace=GRAYColorspace;
if (SyncImagePixelCache((Image *) image,exception) == MagickFalse)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/compress.h
^
|
@@ -49,7 +49,8 @@
ZstdCompression,
WebPCompression,
DWAACompression,
- DWABCompression
+ DWABCompression,
+ BC7Compression
} CompressionType;
typedef struct _Ascii85Info
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/constitute.c
^
|
@@ -486,7 +486,7 @@
sans_exception=AcquireExceptionInfo();
magick_info=GetMagickInfo(read_info->magick,sans_exception);
if (sans_exception->severity == PolicyError)
- magick_info=GetMagickInfo(read_info->magick,exception);
+ InheritException(exception,sans_exception);
sans_exception=DestroyExceptionInfo(sans_exception);
if (magick_info != (const MagickInfo *) NULL)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/delegate.c
^
|
@@ -206,11 +206,7 @@
LinkedListInfo
*cache;
- MagickStatusType
- status;
-
cache=NewLinkedList(0);
- status=MagickTrue;
#if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT
{
const StringInfo
@@ -223,7 +219,7 @@
option=(const StringInfo *) GetNextValueInLinkedList(options);
while (option != (const StringInfo *) NULL)
{
- status&=LoadDelegateCache(cache,(const char *)
+ (void) LoadDelegateCache(cache,(const char *)
GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
option=(const StringInfo *) GetNextValueInLinkedList(options);
}
@@ -231,7 +227,7 @@
}
#endif
if (IsLinkedListEmpty(cache) != MagickFalse)
- status&=LoadDelegateCache(cache,DelegateMap,"built-in",0,exception);
+ (void) LoadDelegateCache(cache,DelegateMap,"built-in",0,exception);
return(cache);
}

@@ -1721,14 +1717,16 @@
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
rights=ExecutePolicyRights;
- if (IsRightsAuthorized(DelegatePolicyDomain,rights,decode) == MagickFalse)
+ if ((decode != (const char *) NULL) &&
+ (IsRightsAuthorized(DelegatePolicyDomain,rights,decode) == MagickFalse))
{
errno=EPERM;
(void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
"NotAuthorized","`%s'",decode);
return(MagickFalse);
}
- if (IsRightsAuthorized(DelegatePolicyDomain,rights,encode) == MagickFalse)
+ if ((encode != (const char *) NULL) &&
+ (IsRightsAuthorized(DelegatePolicyDomain,rights,encode) == MagickFalse))
{
errno=EPERM;
(void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/enhance.c
^
|
@@ -1563,6 +1563,9 @@
*stretch_map,
*white;
+ ImageType
+ type;
+
MagickBooleanType
status;
@@ -1582,7 +1585,8 @@
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- if (SetImageGray(image,exception) != MagickFalse)
+ type=IdentifyImageType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
(void) SetImageColorspace(image,GRAYColorspace,exception);
black=(double *) AcquireQuantumMemory(MaxPixelChannels,sizeof(*black));
white=(double *) AcquireQuantumMemory(MaxPixelChannels,sizeof(*white));
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/histogram.c
^
|
@@ -757,7 +757,7 @@
/*
Add this unique color to the color list.
*/
- if (node_info->number_unique == 0)
+ if (node_info->list == (PixelInfo *) NULL)
node_info->list=(PixelInfo *) AcquireQuantumMemory(1,
sizeof(*node_info->list));
else
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/identify.c
^
|
@@ -472,8 +472,8 @@
const MagickBooleanType verbose,ExceptionInfo *exception)
{
char
+ buffer[MagickPathExtent],
color[MagickPathExtent],
- format[MagickPathExtent],
key[MagickPathExtent];
ChannelFeatures
@@ -606,7 +606,6 @@
channel_statistics);
return(ferror(file) != 0 ? MagickFalse : MagickTrue);
}
- *format='\0';
elapsed_time=GetElapsedTime(&image->timer);
user_time=GetUserTime(&image->timer);
GetTimerInfo(&image->timer);
@@ -650,8 +649,8 @@
if (image->total_colors != 0)
{
(void) FormatMagickSize(image->total_colors,MagickFalse,"B",
- MagickPathExtent,format);
- (void) FormatLocaleFile(file,"%s ",format);
+ MagickPathExtent,buffer);
+ (void) FormatLocaleFile(file,"%s ",buffer);
}
}
else
@@ -668,9 +667,9 @@
image->error.normalized_maximum_error);
if (image->extent != 0)
{
- (void) FormatMagickSize(image->extent,MagickTrue,"B",MagickPathExtent,
- format);
- (void) FormatLocaleFile(file,"%s ",format);
+ (void) FormatMagickSize(image->extent,MagickTrue,"B",
+ MagickPathExtent,buffer);
+ (void) FormatLocaleFile(file,"%s ",buffer);
}
(void) FormatLocaleFile(file,"%0.3fu %lu:%02lu.%03lu",user_time,
(unsigned long) (elapsed_time/60.0),(unsigned long) floor(fmod(
@@ -1281,8 +1280,7 @@
if (IsStringTrue(artifact) != MagickFalse)
{
char
- *points,
- value[MagickPathExtent];
+ *points;
PointInfo
*bounding_box,
@@ -1303,9 +1301,9 @@
points=AcquireString("");
for (n=0; n < (ssize_t) number_points; n++)
{
- (void) FormatLocaleString(value,MagickPathExtent,"%g,%g ",
+ (void) FormatLocaleString(buffer,MagickPathExtent,"%g,%g ",
convex_hull[n].x,convex_hull[n].y);
- (void) ConcatenateString(&points,value);
+ (void) ConcatenateString(&points,buffer);
}
convex_hull=(PointInfo *) RelinquishMagickMemory(convex_hull);
(void) FormatLocaleFile(file," Convex hull: ");
@@ -1318,9 +1316,9 @@
points=AcquireString("");
for (n=0; n < (ssize_t) number_points; n++)
{
- (void) FormatLocaleString(value,MagickPathExtent,"%g,%g ",
+ (void) FormatLocaleString(buffer,MagickPathExtent,"%g,%g ",
bounding_box[n].x,bounding_box[n].y);
- (void) ConcatenateString(&points,value);
+ (void) ConcatenateString(&points,buffer);
}
bounding_box=(PointInfo *) RelinquishMagickMemory(bounding_box);
(void) FormatLocaleFile(file," Minimum bounding box: ");
@@ -1522,18 +1520,18 @@
}
(void) FormatLocaleFile(file," Tainted: %s\n",CommandOptionToMnemonic(
MagickBooleanOptions,(ssize_t) image->taint));
- (void) FormatMagickSize(image->extent,MagickTrue,"B",MagickPathExtent,format);
- (void) FormatLocaleFile(file," Filesize: %s\n",format);
+ (void) FormatMagickSize(image->extent,MagickTrue,"B",MagickPathExtent,buffer);
+ (void) FormatLocaleFile(file," Filesize: %s\n",buffer);
(void) FormatMagickSize((MagickSizeType) image->columns*image->rows,
- MagickFalse,"P",MagickPathExtent,format);
- if (strlen(format) > 1)
- format[strlen(format)-1]='\0';
- (void) FormatLocaleFile(file," Number pixels: %s\n",format);
+ MagickFalse,"P",MagickPathExtent,buffer);
+ if (strlen(buffer) > 1)
+ buffer[strlen(buffer)-1]='\0';
+ (void) FormatLocaleFile(file," Number pixels: %s\n",buffer);
if (elapsed_time > MagickEpsilon)
{
(void) FormatMagickSize((MagickSizeType) ((double) image->columns*
- image->rows/elapsed_time+0.5),MagickFalse,"P",MagickPathExtent,format);
- (void) FormatLocaleFile(file," Pixels per second: %s\n",format);
+ image->rows/elapsed_time+0.5),MagickFalse,"P",MagickPathExtent,buffer);
+ (void) FormatLocaleFile(file," Pixels per second: %s\n",buffer);
}
(void) FormatLocaleFile(file," User time: %0.3fu\n",user_time);
(void) FormatLocaleFile(file," Elapsed time: %lu:%02lu.%03lu\n",
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/image.c
^
|
@@ -736,7 +736,7 @@
if (SetImageStorageClass(clip_mask,DirectClass,exception) == MagickFalse)
return(MagickFalse);
}
- if (inside == MagickFalse)
+ if (inside != MagickFalse)
(void) NegateImage(clip_mask,MagickFalse,exception);
(void) FormatLocaleString(clip_mask->magick_filename,MagickPathExtent,
"8BIM:1999,2998:%s\nPS",pathname);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/locale.c
^
|
@@ -185,15 +185,11 @@
static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
const char *locale,ExceptionInfo *exception)
{
- MagickStatusType
- status;
-
SplayTreeInfo
*cache;
cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
DestroyLocaleNode);
- status=MagickTrue;
#if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT
{
const StringInfo
@@ -206,7 +202,7 @@
option=(const StringInfo *) GetNextValueInLinkedList(options);
while (option != (const StringInfo *) NULL)
{
- status&=LoadLocaleCache(cache,(const char *)
+ (void) LoadLocaleCache(cache,(const char *)
GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,
exception);
option=(const StringInfo *) GetNextValueInLinkedList(options);
@@ -218,7 +214,7 @@
option=(const StringInfo *) GetNextValueInLinkedList(options);
while (option != (const StringInfo *) NULL)
{
- status&=LoadLocaleCache(cache,(const char *)
+ (void) LoadLocaleCache(cache,(const char *)
GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,
exception);
option=(const StringInfo *) GetNextValueInLinkedList(options);
@@ -228,7 +224,7 @@
}
#endif
if (GetNumberOfNodesInSplayTree(cache) == 0)
- status&=LoadLocaleCache(cache,LocaleMap,"built-in",locale,0,
+ (void) LoadLocaleCache(cache,LocaleMap,"built-in",locale,0,
exception);
return(cache);
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/magick-type.h
^
|
@@ -149,11 +149,7 @@
typedef size_t MagickAddressType;
#endif
-#if defined(_MSC_VER) && (_MSC_VER == 1200)
-typedef MagickOffsetType QuantumAny;
-#else
typedef MagickSizeType QuantumAny;
-#endif
#if defined(macintosh)
#define ExceptionInfo MagickExceptionInfo
@@ -185,7 +181,7 @@
*/
#if defined(MAGICKCORE_HAVE_ISNAN) && !defined(__cplusplus) && !defined(c_plusplus)
# define IsNaN(a) isnan(a)
-#elif defined(_MSC_VER) && (_MSC_VER >= 1310)
+#elif defined(_MSC_VER)
# include <float.h>
# define IsNaN(a) _isnan(a)
#else
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/module.c
^
|
@@ -1251,18 +1251,18 @@
module_info=(ModuleInfo *) GetModuleInfo(module,exception);
if (module_info != (ModuleInfo *) NULL)
return(MagickTrue);
- rights=ReadPolicyRights;
- if (IsRightsAuthorized(ModulePolicyDomain,rights,module) == MagickFalse)
+ (void) CopyMagickString(module_name,module,MagickPathExtent);
+ p=GetCoderInfo(module,exception);
+ if (p != (CoderInfo *) NULL)
+ (void) CopyMagickString(module_name,p->name,MagickPathExtent);
+ rights=ReadPolicyRights | WritePolicyRights;
+ if (IsRightsAuthorized(ModulePolicyDomain,rights,module_name) == MagickFalse)
{
errno=EPERM;
(void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
"NotAuthorized","`%s'",module);
return(MagickFalse);
}
- (void) CopyMagickString(module_name,module,MagickPathExtent);
- p=GetCoderInfo(module,exception);
- if (p != (CoderInfo *) NULL)
- (void) CopyMagickString(module_name,p->name,MagickPathExtent);
if (GetValueFromSplayTree(module_list,module_name) != (void *) NULL)
return(MagickTrue); /* module already opened, return */
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/nt-base.c
^
|
@@ -751,7 +751,7 @@
MagickPrivate MagickBooleanType NTGatherRandomData(const size_t length,
unsigned char *random)
{
-#if defined(MAGICKCORE_CIPHER_SUPPORT) && defined(_MSC_VER) && (_MSC_VER > 1200)
+#if defined(MAGICKCORE_CIPHER_SUPPORT) && defined(_MSC_VER)
HCRYPTPROV
handle;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/nt-base.h
^
|
@@ -57,27 +57,39 @@
#define _SC_PAGE_SIZE 1
#define _SC_PHYS_PAGES 2
#define _SC_OPEN_MAX 3
-#if !defined(SSIZE_MAX)
-# ifdef _WIN64
-# define SSIZE_MAX LLONG_MAX
-# else
-# define SSIZE_MAX LONG_MAX
-# endif
+#ifdef _WIN64
+# if !defined(SSIZE_MAX)
+# define SSIZE_MAX LLONG_MAX
+# endif
+# if defined(_MSC_VER)
+# define MAGICKCORE_SIZEOF_SSIZE_T 8
+# endif
+#else
+# if !defined(SSIZE_MAX)
+# define SSIZE_MAX LONG_MAX
+# endif
+# if defined(_MSC_VER)
+# define MAGICKCORE_SIZEOF_SSIZE_T 4
+# endif
#endif
-/*
- _MSC_VER values:
- 1100 MSVC 5.0
- 1200 MSVC 6.0
- 1300 MSVC 7.0 Visual C++ .NET 2002
- 1310 Visual c++ .NET 2003
- 1400 Visual C++ 2005
- 1500 Visual C++ 2008
- 1600 Visual C++ 2010
- 1700 Visual C++ 2012
- 1800 Visual C++ 2013
- 1900 Visual C++ 2015
-*/
+#if defined(_MSC_VER)
+# if !defined(MAGICKCORE_MSC_VER)
+# if (_MSC_VER >= 1930)
+# define MAGICKCORE_MSC_VER 2022
+# elif (_MSC_VER >= 1920)
+# define MAGICKCORE_MSC_VER 2019
+# elif (_MSC_VER >= 1910)
+# define MAGICKCORE_MSC_VER 2017
+# elif (_MSC_VER >= 1900)
+# define MAGICKCORE_MSC_VER 2015
+# elif (_MSC_VER >= 1800)
+# define MAGICKCORE_MSC_VER 2013
+# elif (_MSC_VER >= 1700)
+# define MAGICKCORE_MSC_VER 2012
+# endif
+# endif
+#endif
#if !defined(chsize)
# if defined(__BORLANDC__)
@@ -88,7 +100,7 @@
#endif
#if !defined(access)
-#if defined(_VISUALC_) && (_MSC_VER >= 1400)
+#if defined(_MSC_VER)
# define access(path,mode) _access_s(path,mode)
#endif
#endif
@@ -104,9 +116,6 @@
#if !defined(MAGICKCORE_HAVE_ERF)
# define MAGICKCORE_HAVE_ERF
#endif
-#if defined(_VISUALC_) && (_MSC_VER < 1700)
-# define erf(x) NTErf(x)
-#endif
#if !defined(fdopen)
# define fdopen _fdopen
#endif
@@ -233,11 +242,9 @@
#if !defined(vfprintf_l)
#define vfprintf_l _vfprintf_l
#endif
-#if !defined(vsnprintf)
-#if !defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1500)
+#if !defined(vsnprintf) && !defined(_MSC_VER)
#define vsnprintf _vsnprintf
#endif
-#endif
#if !defined(vsnprintf_l)
#define vsnprintf_l _vsnprintf_l
#endif
@@ -246,7 +253,6 @@
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
!(defined(__BORLANDC__)) && \
- !(defined(_MSC_VER) && (_MSC_VER < 1400)) && \
!(defined(__MSVCRT_VERSION__) && (__MSVCRT_VERSION__ < 0x800))
# if !defined(fseek)
# define fseek _fseeki64
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/option.c
^
|
@@ -177,71 +177,71 @@
{ "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
{ "Y", YellowChannel, UndefinedOptionFlag, MagickFalse },
{ "Yellow", YellowChannel, UndefinedOptionFlag, MagickFalse },
- { "0", (ssize_t) (1L << 0), UndefinedOptionFlag, MagickFalse },
- { "1", (ssize_t) (1L << 1), UndefinedOptionFlag, MagickFalse },
- { "2", (ssize_t) (1L << 2), UndefinedOptionFlag, MagickFalse },
- { "3", (ssize_t) (1L << 3), UndefinedOptionFlag, MagickFalse },
- { "4", (ssize_t) (1L << 4), UndefinedOptionFlag, MagickFalse },
- { "5", (ssize_t) (1L << 5), UndefinedOptionFlag, MagickFalse },
- { "6", (ssize_t) (1L << 6), UndefinedOptionFlag, MagickFalse },
- { "7", (ssize_t) (1L << 7), UndefinedOptionFlag, MagickFalse },
- { "8", (ssize_t) (1L << 8), UndefinedOptionFlag, MagickFalse },
- { "9", (ssize_t) (1L << 9), UndefinedOptionFlag, MagickFalse },
- { "10", (ssize_t) (1L << 10), UndefinedOptionFlag, MagickFalse },
- { "11", (ssize_t) (1L << 11), UndefinedOptionFlag, MagickFalse },
- { "12", (ssize_t) (1L << 12), UndefinedOptionFlag, MagickFalse },
- { "13", (ssize_t) (1L << 13), UndefinedOptionFlag, MagickFalse },
- { "14", (ssize_t) (1L << 14), UndefinedOptionFlag, MagickFalse },
- { "15", (ssize_t) (1L << 15), UndefinedOptionFlag, MagickFalse },
- { "16", (ssize_t) (1L << 16), UndefinedOptionFlag, MagickFalse },
- { "17", (ssize_t) (1L << 17), UndefinedOptionFlag, MagickFalse },
- { "18", (ssize_t) (1L << 18), UndefinedOptionFlag, MagickFalse },
- { "19", (ssize_t) (1L << 19), UndefinedOptionFlag, MagickFalse },
- { "20", (ssize_t) (1L << 20), UndefinedOptionFlag, MagickFalse },
- { "21", (ssize_t) (1L << 21), UndefinedOptionFlag, MagickFalse },
- { "22", (ssize_t) (1L << 22), UndefinedOptionFlag, MagickFalse },
- { "23", (ssize_t) (1L << 23), UndefinedOptionFlag, MagickFalse },
- { "24", (ssize_t) (1L << 24), UndefinedOptionFlag, MagickFalse },
- { "25", (ssize_t) (1L << 25), UndefinedOptionFlag, MagickFalse },
- { "26", (ssize_t) (1L << 26), UndefinedOptionFlag, MagickFalse },
- { "27", (ssize_t) (1L << 27), UndefinedOptionFlag, MagickFalse },
- { "28", (ssize_t) (1L << 28), UndefinedOptionFlag, MagickFalse },
- { "29", (ssize_t) (1L << 29), UndefinedOptionFlag, MagickFalse },
- { "30", (ssize_t) (1L << 30), UndefinedOptionFlag, MagickFalse },
- { "31", (ssize_t) (1L << 31), UndefinedOptionFlag, MagickFalse },
+ { "0", (((ssize_t) 1) << 0), UndefinedOptionFlag, MagickFalse },
+ { "1", (((ssize_t) 1) << 1), UndefinedOptionFlag, MagickFalse },
+ { "2", (((ssize_t) 1) << 2), UndefinedOptionFlag, MagickFalse },
+ { "3", (((ssize_t) 1) << 3), UndefinedOptionFlag, MagickFalse },
+ { "4", (((ssize_t) 1) << 4), UndefinedOptionFlag, MagickFalse },
+ { "5", (((ssize_t) 1) << 5), UndefinedOptionFlag, MagickFalse },
+ { "6", (((ssize_t) 1) << 6), UndefinedOptionFlag, MagickFalse },
+ { "7", (((ssize_t) 1) << 7), UndefinedOptionFlag, MagickFalse },
+ { "8", (((ssize_t) 1) << 8), UndefinedOptionFlag, MagickFalse },
+ { "9", (((ssize_t) 1) << 9), UndefinedOptionFlag, MagickFalse },
+ { "10", (((ssize_t) 1) << 10), UndefinedOptionFlag, MagickFalse },
+ { "11", (((ssize_t) 1) << 11), UndefinedOptionFlag, MagickFalse },
+ { "12", (((ssize_t) 1) << 12), UndefinedOptionFlag, MagickFalse },
+ { "13", (((ssize_t) 1) << 13), UndefinedOptionFlag, MagickFalse },
+ { "14", (((ssize_t) 1) << 14), UndefinedOptionFlag, MagickFalse },
+ { "15", (((ssize_t) 1) << 15), UndefinedOptionFlag, MagickFalse },
+ { "16", (((ssize_t) 1) << 16), UndefinedOptionFlag, MagickFalse },
+ { "17", (((ssize_t) 1) << 17), UndefinedOptionFlag, MagickFalse },
+ { "18", (((ssize_t) 1) << 18), UndefinedOptionFlag, MagickFalse },
+ { "19", (((ssize_t) 1) << 19), UndefinedOptionFlag, MagickFalse },
+ { "20", (((ssize_t) 1) << 20), UndefinedOptionFlag, MagickFalse },
+ { "21", (((ssize_t) 1) << 21), UndefinedOptionFlag, MagickFalse },
+ { "22", (((ssize_t) 1) << 22), UndefinedOptionFlag, MagickFalse },
+ { "23", (((ssize_t) 1) << 23), UndefinedOptionFlag, MagickFalse },
+ { "24", (((ssize_t) 1) << 24), UndefinedOptionFlag, MagickFalse },
+ { "25", (((ssize_t) 1) << 25), UndefinedOptionFlag, MagickFalse },
+ { "26", (((ssize_t) 1) << 26), UndefinedOptionFlag, MagickFalse },
+ { "27", (((ssize_t) 1) << 27), UndefinedOptionFlag, MagickFalse },
+ { "28", (((ssize_t) 1) << 28), UndefinedOptionFlag, MagickFalse },
+ { "29", (((ssize_t) 1) << 29), UndefinedOptionFlag, MagickFalse },
+ { "30", (((ssize_t) 1) << 30), UndefinedOptionFlag, MagickFalse },
+ { "31", (((ssize_t) 1) << 31), UndefinedOptionFlag, MagickFalse },
#if MAGICKCORE_SIZEOF_SSIZE_T > 4
- { "32", (ssize_t) (1L << 32), UndefinedOptionFlag, MagickFalse },
- { "33", (ssize_t) (1L << 33), UndefinedOptionFlag, MagickFalse },
- { "34", (ssize_t) (1L << 34), UndefinedOptionFlag, MagickFalse },
- { "35", (ssize_t) (1L << 35), UndefinedOptionFlag, MagickFalse },
- { "36", (ssize_t) (1L << 36), UndefinedOptionFlag, MagickFalse },
- { "37", (ssize_t) (1L << 37), UndefinedOptionFlag, MagickFalse },
- { "38", (ssize_t) (1L << 38), UndefinedOptionFlag, MagickFalse },
- { "39", (ssize_t) (1L << 39), UndefinedOptionFlag, MagickFalse },
- { "40", (ssize_t) (1L << 40), UndefinedOptionFlag, MagickFalse },
- { "41", (ssize_t) (1L << 41), UndefinedOptionFlag, MagickFalse },
- { "42", (ssize_t) (1L << 42), UndefinedOptionFlag, MagickFalse },
- { "43", (ssize_t) (1L << 43), UndefinedOptionFlag, MagickFalse },
- { "44", (ssize_t) (1L << 44), UndefinedOptionFlag, MagickFalse },
- { "45", (ssize_t) (1L << 45), UndefinedOptionFlag, MagickFalse },
- { "46", (ssize_t) (1L << 46), UndefinedOptionFlag, MagickFalse },
- { "47", (ssize_t) (1L << 47), UndefinedOptionFlag, MagickFalse },
- { "48", (ssize_t) (1L << 48), UndefinedOptionFlag, MagickFalse },
- { "49", (ssize_t) (1L << 49), UndefinedOptionFlag, MagickFalse },
- { "50", (ssize_t) (1L << 50), UndefinedOptionFlag, MagickFalse },
- { "51", (ssize_t) (1L << 41), UndefinedOptionFlag, MagickFalse },
- { "52", (ssize_t) (1L << 52), UndefinedOptionFlag, MagickFalse },
- { "53", (ssize_t) (1L << 53), UndefinedOptionFlag, MagickFalse },
- { "54", (ssize_t) (1L << 54), UndefinedOptionFlag, MagickFalse },
- { "55", (ssize_t) (1L << 55), UndefinedOptionFlag, MagickFalse },
- { "56", (ssize_t) (1L << 56), UndefinedOptionFlag, MagickFalse },
- { "57", (ssize_t) (1L << 57), UndefinedOptionFlag, MagickFalse },
- { "58", (ssize_t) (1L << 58), UndefinedOptionFlag, MagickFalse },
- { "59", (ssize_t) (1L << 59), UndefinedOptionFlag, MagickFalse },
- { "60", (ssize_t) (1L << 60), UndefinedOptionFlag, MagickFalse },
- { "61", (ssize_t) (1L << 61), UndefinedOptionFlag, MagickFalse },
- { "62", (ssize_t) (1L << 62), UndefinedOptionFlag, MagickFalse },
- { "63", (ssize_t) (1L << 63), UndefinedOptionFlag, MagickFalse },
+ { "32", (((ssize_t) 1) << 32), UndefinedOptionFlag, MagickFalse },
+ { "33", (((ssize_t) 1) << 33), UndefinedOptionFlag, MagickFalse },
+ { "34", (((ssize_t) 1) << 34), UndefinedOptionFlag, MagickFalse },
+ { "35", (((ssize_t) 1) << 35), UndefinedOptionFlag, MagickFalse },
+ { "36", (((ssize_t) 1) << 36), UndefinedOptionFlag, MagickFalse },
+ { "37", (((ssize_t) 1) << 37), UndefinedOptionFlag, MagickFalse },
+ { "38", (((ssize_t) 1) << 38), UndefinedOptionFlag, MagickFalse },
+ { "39", (((ssize_t) 1) << 39), UndefinedOptionFlag, MagickFalse },
+ { "40", (((ssize_t) 1) << 40), UndefinedOptionFlag, MagickFalse },
+ { "41", (((ssize_t) 1) << 41), UndefinedOptionFlag, MagickFalse },
+ { "42", (((ssize_t) 1) << 42), UndefinedOptionFlag, MagickFalse },
+ { "43", (((ssize_t) 1) << 43), UndefinedOptionFlag, MagickFalse },
+ { "44", (((ssize_t) 1) << 44), UndefinedOptionFlag, MagickFalse },
+ { "45", (((ssize_t) 1) << 45), UndefinedOptionFlag, MagickFalse },
+ { "46", (((ssize_t) 1) << 46), UndefinedOptionFlag, MagickFalse },
+ { "47", (((ssize_t) 1) << 47), UndefinedOptionFlag, MagickFalse },
+ { "48", (((ssize_t) 1) << 48), UndefinedOptionFlag, MagickFalse },
+ { "49", (((ssize_t) 1) << 49), UndefinedOptionFlag, MagickFalse },
+ { "50", (((ssize_t) 1) << 50), UndefinedOptionFlag, MagickFalse },
+ { "51", (((ssize_t) 1) << 41), UndefinedOptionFlag, MagickFalse },
+ { "52", (((ssize_t) 1) << 52), UndefinedOptionFlag, MagickFalse },
+ { "53", (((ssize_t) 1) << 53), UndefinedOptionFlag, MagickFalse },
+ { "54", (((ssize_t) 1) << 54), UndefinedOptionFlag, MagickFalse },
+ { "55", (((ssize_t) 1) << 55), UndefinedOptionFlag, MagickFalse },
+ { "56", (((ssize_t) 1) << 56), UndefinedOptionFlag, MagickFalse },
+ { "57", (((ssize_t) 1) << 57), UndefinedOptionFlag, MagickFalse },
+ { "58", (((ssize_t) 1) << 58), UndefinedOptionFlag, MagickFalse },
+ { "59", (((ssize_t) 1) << 59), UndefinedOptionFlag, MagickFalse },
+ { "60", (((ssize_t) 1) << 60), UndefinedOptionFlag, MagickFalse },
+ { "61", (((ssize_t) 1) << 61), UndefinedOptionFlag, MagickFalse },
+ { "62", (((ssize_t) 1) << 62), UndefinedOptionFlag, MagickFalse },
+ { "63", (((ssize_t) 1) << 63), UndefinedOptionFlag, MagickFalse },
#endif
{ (char *) NULL, UndefinedChannel, UndefinedOptionFlag, MagickFalse }
},
@@ -1290,6 +1290,7 @@
{ "DXT1", DXT1Compression, UndefinedOptionFlag, MagickFalse },
{ "DXT3", DXT3Compression, UndefinedOptionFlag, MagickFalse },
{ "DXT5", DXT5Compression, UndefinedOptionFlag, MagickFalse },
+ { "BC7", BC7Compression, UndefinedOptionFlag, MagickFalse },
{ "Fax", FaxCompression, UndefinedOptionFlag, MagickFalse },
{ "Group4", Group4Compression, UndefinedOptionFlag, MagickFalse },
{ "JBIG1", JBIG1Compression, UndefinedOptionFlag, MagickFalse },
@@ -2724,6 +2725,8 @@
assert(option != (const char *) NULL);
if ((*option != '-') && (*option != '+'))
return(MagickFalse);
+ if (IsPathAccessible(option) != MagickFalse)
+ return(MagickFalse);
if (strlen(option) == 1)
return(((*option == '{') || (*option == '}') || (*option == '[') ||
(*option == ']')) ? MagickTrue : MagickFalse);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/profile.c
^
|
@@ -367,8 +367,8 @@
intent;
double
- scale,
- translate;
+ scale[4],
+ translate[4];
void
**magick_restrict pixels;
@@ -413,8 +413,8 @@
return(pixels);
}
-static void **AcquirePixelThreadSet(const size_t columns,
- const size_t channels,MagickBooleanType highres)
+static void **AcquirePixelThreadSet(const size_t columns,const size_t channels,
+ MagickBooleanType highres)
{
ssize_t
i;
@@ -465,12 +465,12 @@
cmsHTRANSFORM
*transform;
- ssize_t
- i;
-
size_t
number_threads;
+ ssize_t
+ i;
+
number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
transform=(cmsHTRANSFORM *) AcquireQuantumMemory(number_threads,
sizeof(*transform));
@@ -525,10 +525,10 @@
const LCMSInfo *source_info,const LCMSInfo *target_info,
const cmsHTRANSFORM *transform,Quantum *q)
{
-#define GetLCMSPixel(source_info,pixel) \
- (source_info->scale*QuantumScale*(pixel)+source_info->translate)
-#define SetLCMSPixel(target_info,pixel) \
- ClampToQuantum(target_info->scale*QuantumRange*(pixel)+target_info->translate)
+#define GetLCMSPixel(source_info,pixel,index) \
+ (source_info->scale[index]*((QuantumScale*pixel)+source_info->translate[index]))
+#define SetLCMSPixel(target_info,pixel,index) \
+ ClampToQuantum(target_info->scale[index]*((QuantumRange*pixel)+target_info->translate[index]))
double
*p;
@@ -539,37 +539,37 @@
p=(double *) source_info->pixels[id];
for (x=0; x < (ssize_t) image->columns; x++)
{
- *p++=GetLCMSPixel(source_info,GetPixelRed(image,q));
+ *p++=GetLCMSPixel(source_info,GetPixelRed(image,q),0);
if (source_info->channels > 1)
{
- *p++=GetLCMSPixel(source_info,GetPixelGreen(image,q));
- *p++=GetLCMSPixel(source_info,GetPixelBlue(image,q));
+ *p++=GetLCMSPixel(source_info,GetPixelGreen(image,q),1);
+ *p++=GetLCMSPixel(source_info,GetPixelBlue(image,q),2);
}
if (source_info->channels > 3)
- *p++=GetLCMSPixel(source_info,GetPixelBlack(image,q));
+ *p++=GetLCMSPixel(source_info,GetPixelBlack(image,q),3);
q+=GetPixelChannels(image);
}
- cmsDoTransform(transform[id],source_info->pixels[id],
- target_info->pixels[id],(unsigned int) image->columns);
+ cmsDoTransform(transform[id],source_info->pixels[id],target_info->pixels[id],
+ (unsigned int) image->columns);
p=(double *) target_info->pixels[id];
q-=GetPixelChannels(image)*image->columns;
for (x=0; x < (ssize_t) image->columns; x++)
{
if (target_info->channels == 1)
- SetPixelGray(image,SetLCMSPixel(target_info,*p),q);
+ SetPixelGray(image,SetLCMSPixel(target_info,*p,0),q);
else
- SetPixelRed(image,SetLCMSPixel(target_info,*p),q);
+ SetPixelRed(image,SetLCMSPixel(target_info,*p,0),q);
p++;
if (target_info->channels > 1)
{
- SetPixelGreen(image,SetLCMSPixel(target_info,*p),q);
+ SetPixelGreen(image,SetLCMSPixel(target_info,*p,1),q);
p++;
- SetPixelBlue(image,SetLCMSPixel(target_info,*p),q);
+ SetPixelBlue(image,SetLCMSPixel(target_info,*p,2),q);
p++;
}
if (target_info->channels > 3)
{
- SetPixelBlack(image,SetLCMSPixel(target_info,*p),q);
+ SetPixelBlack(image,SetLCMSPixel(target_info,*p,3),q);
p++;
}
q+=GetPixelChannels(image);
@@ -599,8 +599,8 @@
*p++=GetPixelBlack(image,q);
q+=GetPixelChannels(image);
}
- cmsDoTransform(transform[id],source_info->pixels[id],
- target_info->pixels[id],(unsigned int) image->columns);
+ cmsDoTransform(transform[id],source_info->pixels[id],target_info->pixels[id],
+ (unsigned int) image->columns);
p=(Quantum *) target_info->pixels[id];
q-=GetPixelChannels(image)*image->columns;
for (x=0; x < (ssize_t) image->columns; x++)
@@ -619,6 +619,22 @@
q+=GetPixelChannels(image);
}
}
+
+static inline void SetLCMSInfoTranslate(LCMSInfo *info,const double translate)
+{
+ info->translate[0]=translate;
+ info->translate[1]=translate;
+ info->translate[2]=translate;
+ info->translate[3]=translate;
+}
+
+static inline void SetLCMSInfoScale(LCMSInfo *info,const double scale)
+{
+ info->scale[0]=scale;
+ info->scale[1]=scale;
+ info->scale[2]=scale;
+ info->scale[3]=scale;
+}
#endif
static MagickBooleanType SetsRGBImageProfile(Image *image,
@@ -1056,11 +1072,6 @@
cmsUInt32Number
flags;
-#if !defined(MAGICKCORE_HDRI_SUPPORT)
- const char
- *artifact;
-#endif
-
MagickBooleanType
highres;
@@ -1075,20 +1086,25 @@
{
target_info.profile=source_info.profile;
source_info.profile=cmsOpenProfileFromMemTHR(cms_context,
- GetStringInfoDatum(icc_profile),
- (cmsUInt32Number) GetStringInfoLength(icc_profile));
+ GetStringInfoDatum(icc_profile),(cmsUInt32Number)
+ GetStringInfoLength(icc_profile));
if (source_info.profile == (cmsHPROFILE) NULL)
ThrowProfileException(ResourceLimitError,
"ColorspaceColorProfileMismatch",name);
}
highres=MagickTrue;
-#if !defined(MAGICKCORE_HDRI_SUPPORT)
- artifact=GetImageArtifact(image,"profile:highres-transform");
- if (IsStringFalse(artifact) != MagickFalse)
- highres=MagickFalse;
+#if !defined(MAGICKCORE_HDRI_SUPPORT) || (MAGICKCORE_QUANTUM_DEPTH > 16)
+ {
+ const char
+ *artifact;
+
+ artifact=GetImageArtifact(image,"profile:highres-transform");
+ if (IsStringFalse(artifact) != MagickFalse)
+ highres=MagickFalse;
+ }
#endif
- source_info.scale=1.0;
- source_info.translate=0.0;
+ SetLCMSInfoScale(&source_info,1.0);
+ SetLCMSInfoTranslate(&source_info,0.0);
source_info.colorspace=sRGBColorspace;
source_info.channels=3;
switch (cmsGetColorSpace(source_info.profile))
@@ -1097,84 +1113,82 @@
{
source_info.colorspace=CMYKColorspace;
source_info.channels=4;
+ if (highres != MagickFalse)
+ {
+ source_info.type=(cmsUInt32Number) TYPE_CMYK_DBL;
+ SetLCMSInfoScale(&source_info,100.0);
+ }
#if (MAGICKCORE_QUANTUM_DEPTH == 8)
- if (highres == MagickFalse)
- source_info.type=(cmsUInt32Number) TYPE_CMYK_8;
else
+ source_info.type=(cmsUInt32Number) TYPE_CMYK_8;
#elif (MAGICKCORE_QUANTUM_DEPTH == 16)
- if (highres == MagickFalse)
- source_info.type=(cmsUInt32Number) TYPE_CMYK_16;
else
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/property.c
^
|
@@ -2562,9 +2562,6 @@
WarnNoImageReturn("\"%%%c\"",letter);
colorspace=image->colorspace;
- if ((image->columns != 0) && (image->rows != 0) &&
- (SetImageGray(image,exception) != MagickFalse))
- colorspace=GRAYColorspace; /* FUTURE: this is IMv6 not IMv7 */
(void) FormatLocaleString(value,MagickPathExtent,"%s %s %s",
CommandOptionToMnemonic(MagickClassOptions,(ssize_t)
image->storage_class),CommandOptionToMnemonic(MagickColorspaceOptions,
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/quantize.c
^
|
@@ -640,8 +640,7 @@
if (cube_info->quantize_info->measure_error != MagickFalse)
(void) GetImageQuantizeError(image,exception);
if ((cube_info->quantize_info->number_colors == 2) &&
- ((cube_info->quantize_info->colorspace == LinearGRAYColorspace) ||
- (cube_info->quantize_info->colorspace == GRAYColorspace)))
+ (IsGrayColorspace(cube_info->quantize_info->colorspace)))
{
double
intensity;
@@ -1988,7 +1987,7 @@
cube_info->y=0;
extent=MagickMax(image->columns,image->rows);
level=(size_t) log2((double) extent);
- if ((1UL << level) < extent)
+ if (((size_t) 1UL << level) < extent)
level++;
cube_info->offset=0;
cube_info->span=(MagickSizeType) image->columns*image->rows;
@@ -2956,17 +2955,20 @@
for (i=0; i < (ssize_t) number_children; i++)
if (node_info->child[i] != (NodeInfo *) NULL)
PruneChild(cube_info,node_info->child[i]);
- /*
- Merge color statistics into parent.
- */
- parent=node_info->parent;
- parent->number_unique+=node_info->number_unique;
- parent->total_color.red+=node_info->total_color.red;
- parent->total_color.green+=node_info->total_color.green;
- parent->total_color.blue+=node_info->total_color.blue;
- parent->total_color.alpha+=node_info->total_color.alpha;
- parent->child[node_info->id]=(NodeInfo *) NULL;
- cube_info->nodes--;
+ if (cube_info->nodes > cube_info->maximum_colors)
+ {
+ /*
+ Merge color statistics into parent.
+ */
+ parent=node_info->parent;
+ parent->number_unique+=node_info->number_unique;
+ parent->total_color.red+=node_info->total_color.red;
+ parent->total_color.green+=node_info->total_color.green;
+ parent->total_color.blue+=node_info->total_color.blue;
+ parent->total_color.alpha+=node_info->total_color.alpha;
+ parent->child[node_info->id]=(NodeInfo *) NULL;
+ cube_info->nodes--;
+ }
}

/*
@@ -3094,6 +3096,9 @@
CubeInfo
*cube_info;
+ ImageType
+ type;
+
MagickBooleanType
status;
@@ -3114,11 +3119,9 @@
maximum_colors=MaxColormapSize;
if (maximum_colors > MaxColormapSize)
maximum_colors=MaxColormapSize;
- if (image->alpha_trait == UndefinedPixelTrait)
- {
- if (SetImageGray(image,exception) != MagickFalse)
- (void) SetGrayscaleImage(image,exception);
- }
+ type=IdentifyImageType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
+ (void) SetGrayscaleImage(image,exception);
depth=quantize_info->tree_depth;
if (depth == 0)
{
@@ -3135,7 +3138,7 @@
depth--;
if ((image->alpha_trait != UndefinedPixelTrait) && (depth > 5))
depth--;
- if (SetImageGray(image,exception) != MagickFalse)
+ if (IsGrayImageType(type) != MagickFalse)
depth=MaxTreeDepth;
}
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/resize.c
^
|
@@ -655,11 +655,11 @@
% crossing is at (36 sqrt(2) + 123)/(72 sqrt(2) + 47), almost the same as the
% first crossing of Mitchell and Lanczos2Sharp.
%
-% RodidouxSharp is a slightly sharper version of Rodidoux, some believe it
+% RobidouxSharp is a slightly sharper version of Robidoux, some believe it
% is too sharp. It is designed to minimize the maximum possible change in
% a pixel value which is at one of the extremes (e.g., 0 or 255) under no-op
-% conditions. Amazingly Mitchell falls roughly between Rodidoux and
-% RodidouxSharp, though this seems to have been pure coincidence.
+% conditions. Amazingly Mitchell falls roughly between Robidoux and
+% RobidouxSharp, though this seems to have been pure coincidence.
%
% 'EXPERT' OPTIONS:
%
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/static.c
^
|
@@ -236,18 +236,18 @@
Assign module name from alias.
*/
assert(module != (const char *) NULL);
- rights=ReadPolicyRights;
- if (IsRightsAuthorized(ModulePolicyDomain,rights,module) == MagickFalse)
+ (void) CopyMagickString(module_name,module,MagickPathExtent);
+ p=GetCoderInfo(module,exception);
+ if (p != (CoderInfo *) NULL)
+ (void) CopyMagickString(module_name,p->name,MagickPathExtent);
+ rights=ReadPolicyRights | WritePolicyRights;
+ if (IsRightsAuthorized(ModulePolicyDomain,rights,module_name) == MagickFalse)
{
errno=EPERM;
(void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
"NotAuthorized","`%s'",module);
return(MagickFalse);
}
- (void) CopyMagickString(module_name,module,MagickPathExtent);
- p=GetCoderInfo(module,exception);
- if (p != (CoderInfo *) NULL)
- (void) CopyMagickString(module_name,p->name,MagickPathExtent);
extent=sizeof(MagickModules)/sizeof(MagickModules[0]);
for (i=0; i < (ssize_t) extent; i++)
if (LocaleCompare(MagickModules[i].module,module_name) == 0)
@@ -283,17 +283,24 @@
*/
MagickExport void RegisterStaticModules(void)
{
+ PolicyRights
+ rights;
+
size_t
extent;
ssize_t
i;
+ rights=ReadPolicyRights | WritePolicyRights;
extent=sizeof(MagickModules)/sizeof(MagickModules[0]);
for (i=0; i < (ssize_t) extent; i++)
{
if (MagickModules[i].registered == MagickFalse)
{
+ if (IsRightsAuthorized(ModulePolicyDomain,rights,
+ MagickModules[i].module) == MagickFalse)
+ continue;
(void) (MagickModules[i].register_module)();
MagickModules[i].registered=MagickTrue;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/string.c
^
|
@@ -1093,11 +1093,7 @@
bytes=1024.0;
units=bi_units;
}
-#if defined(_MSC_VER) && (_MSC_VER == 1200)
- extent=(double) ((MagickOffsetType) size);
-#else
extent=(double) size;
-#endif
(void) FormatLocaleString(p,MagickPathExtent,"%.*g",GetMagickPrecision(),
extent);
(void) FormatLocaleString(q,MagickPathExtent,"%.20g",extent);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/studio.h
^
|
@@ -175,9 +175,6 @@
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT)
# include <sys/types.h>
# include <sys/stat.h>
-# if defined(MAGICKCORE_HAVE_SYS_TIMEB_H)
-# include <sys/timeb.h>
-# endif
# if defined(MAGICKCORE_POSIX_SUPPORT)
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
# define dirent direct
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/type.c
^
|
@@ -190,15 +190,11 @@
static SplayTreeInfo *AcquireTypeCache(const char *filename,
ExceptionInfo *exception)
{
- MagickStatusType
- status;
-
SplayTreeInfo
*cache;
cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
DestroyTypeNode);
- status=MagickTrue;
#if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT
{
char
@@ -217,7 +213,7 @@
while (option != (const StringInfo *) NULL)
{
(void) CopyMagickString(path,GetStringInfoPath(option),MagickPathExtent);
- status&=LoadTypeCache(cache,(const char *)
+ (void) LoadTypeCache(cache,(const char *)
GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
option=(const StringInfo *) GetNextValueInLinkedList(options);
}
@@ -236,7 +232,7 @@
xml=FileToString(path,~0UL,exception);
if (xml != (void *) NULL)
{
- status&=LoadTypeCache(cache,xml,path,0,exception);
+ (void) LoadTypeCache(cache,xml,path,0,exception);
xml=DestroyString(xml);
}
font_path=DestroyString(font_path);
@@ -244,7 +240,7 @@
}
#endif
if (GetNumberOfNodesInSplayTree(cache) == 0)
- status&=LoadTypeCache(cache,TypeMap,"built-in",0,exception);
+ (void) LoadTypeCache(cache,TypeMap,"built-in",0,exception);
return(cache);
}

|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/utility-private.h
^
|
@@ -21,6 +21,9 @@
#include "MagickCore/memory_.h"
#include "MagickCore/nt-base.h"
#include "MagickCore/nt-base-private.h"
+#if defined(MAGICKCORE_HAVE_UTIME_H)
+#include <utime.h>
+#endif
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -59,7 +62,7 @@
{
int
count;
-
+
wchar_t
*wideChar;
@@ -273,6 +276,74 @@
#endif
}
+static inline int set_file_timestamp(const char *path,struct stat *attributes)
+{
+ int
+ status;
+
+#if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__)
+#if defined(MAGICKCORE_HAVE_UTIMENSAT)
+#if defined(__APPLE__) || defined(__NetBSD__)
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
+
+ struct timespec
+ timestamp[2];
+
+ timestamp[0]=attributes->st_atim;
+ timestamp[1]=attributes->st_mtim;
+ status=utimensat(AT_FDCWD,path,timestamp,0);
+#else
+ struct utimbuf
+ timestamp;
+
+ timestamp.actime=attributes->st_atime;
+ timestamp.modtime=attributes->st_mtime;
+ status=utime(path,×tamp);
+#endif
+#else
+ HANDLE
+ handle;
+
+ wchar_t
+ *path_wide;
+
+ status=(-1);
+ path_wide=create_wchar_path(path);
+ if (path_wide == (WCHAR *) NULL)
+ return(status);
+ handle=CreateFileW(path_wide,FILE_WRITE_ATTRIBUTES,FILE_SHARE_WRITE |
+ FILE_SHARE_READ,NULL,OPEN_EXISTING,0,NULL);
+ if (handle != (HANDLE) NULL)
+ {
+ FILETIME
+ creationTime,
+ lastAccessTime,
+ lastWriteTime;
+
+ LONGLONG
+ dateTime;
+
+ dateTime=Int32x32To64(attributes->st_ctime,10000000)+116444736000000000;
+ creationTime.dwLowDateTime=(DWORD) dateTime;
+ creationTime.dwHighDateTime=dateTime>>32;
+ dateTime=Int32x32To64(attributes->st_atime,10000000)+116444736000000000;
+ lastAccessTime.dwLowDateTime=(DWORD) dateTime;
+ lastAccessTime.dwHighDateTime=dateTime>>32;
+ dateTime=Int32x32To64(attributes->st_mtime,10000000)+116444736000000000;
+ lastWriteTime.dwLowDateTime=(DWORD) dateTime;
+ lastWriteTime.dwHighDateTime=dateTime>>32;
+ status=SetFileTime(handle,&creationTime,&lastAccessTime,&lastWriteTime);
+ CloseHandle(handle);
+ status=0;
+ }
+ path_wide=(WCHAR *) RelinquishMagickMemory(path_wide);
+#endif
+ return(status);
+}
+
static inline int stat_utf8(const char *path,struct stat *attributes)
{
#if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/version.c
^
|
@@ -635,12 +635,25 @@
GetMagickVersion((size_t *) NULL));;
(void) FormatLocaleFile(file,"Copyright: %s\n",GetMagickCopyright());
(void) FormatLocaleFile(file,"License: %s\n",GetMagickLicense());
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_MSC_FULL_VER)
- (void) FormatLocaleFile(file,"Visual C++: %d\n",_MSC_FULL_VER);
-#endif
(void) FormatLocaleFile(file,"Features: %s\n",GetMagickFeatures());
(void) FormatLocaleFile(file,"Delegates (built-in): %s\n",
GetMagickDelegates());
+#if defined(MAGICKCORE_MSC_VER)
+ (void) FormatLocaleFile(file,"Compiler: Visual Studio %d (%d)\n",
+ MAGICKCORE_MSC_VER,_MSC_FULL_VER);
+#elif defined(__GNUC__)
+ (void) FormatLocaleFile(file,"Compiler: gcc (%d.%d)\n",__GNUC__,
+ __GNUC_MINOR__);
+#elif defined(__clang__)
+ (void) FormatLocaleFile(file,"Compiler: clang (%d.%d.%d)\n",__clang_major__,
+ __clang_minor__,__clang_patchlevel__);
+#elif defined(__MINGW32_MAJOR_VERSION)
+ (void) FormatLocaleFile(file,"Compiler: MinGW (%d.%d)\n",
+ __MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION);
+#elif defined(__MINGW64_VERSION_MAJOR)
+ (void) FormatLocaleFile(file,"Compiler: MinGW-w64 (%d.%d)\n",
+ __MINGW64_VERSION_MAJOR ,__MINGW64_VERSION_MINOR);
+#endif
if (IsEventLogging() != MagickFalse)
{
(void) FormatLocaleFile(file,"Wizard attributes: ");
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/version.h.in
^
|
@@ -60,10 +60,15 @@
#define MagickQuantumDepth "Q?"
#define MagickQuantumRange "?"
#endif
+#if defined(MAGICKCORE_HDRI_SUPPORT)
+#define MagickHDRISupport "-HDRI"
+#else
+#define MagickHDRISupport ""
+#endif
#define MagickVersion \
MagickPackageName " " MagickLibVersionText MagickLibAddendum " " \
- MagickQuantumDepth " " MagickPlatform " " MagickReleaseDate " " \
- MagickAuthoritativeURL
+ MagickQuantumDepth MagickHDRISupport " " MagickPlatform " " \
+ MagickReleaseDate " " MagickAuthoritativeURL
extern MagickExport char
*GetMagickHomeURL(void);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickCore/widget.c
^
|
@@ -7873,6 +7873,8 @@
break;
}
state&=(~InactiveWidgetState);
+ if (selection_info.height == 0)
+ break;
id=(event.xbutton.y-top_offset)/(int) selection_info.height;
selection_info.id=id;
if ((id < 0) || (id >= (int) number_selections))
@@ -7926,6 +7928,8 @@
if (event.xcrossing.state == 0)
break;
state&=(~InactiveWidgetState);
+ if (selection_info.height == 0)
+ break;
id=((event.xcrossing.y-top_offset)/(int) selection_info.height);
if ((selection_info.id >= 0) &&
(selection_info.id < (int) number_selections))
@@ -8012,6 +8016,8 @@
break;
if (state & InactiveWidgetState)
break;
+ if (selection_info.height == 0)
+ break;
id=(event.xmotion.y-top_offset)/(int) selection_info.height;
if ((selection_info.id >= 0) &&
(selection_info.id < (int) number_selections))
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickWand/animate.c
^
|
@@ -1152,7 +1152,10 @@
if (i == (ssize_t) argc)
ThrowAnimateException(OptionError,"MissingArgument",option);
if (XRemoteCommand(display,resource_info.window_id,argv[i]) != 0)
- return(MagickFalse);
+ {
+ DestroyAnimate();
+ return(MagickFalse);
+ }
i--;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickWand/display.c
^
|
@@ -1500,7 +1500,10 @@
if (i == (ssize_t) argc)
ThrowDisplayException(OptionError,"MissingArgument",option);
if (XRemoteCommand(display,resource_info.window_id,argv[i]) != 0)
- return(MagickFalse);
+ {
+ DestroyDisplay();
+ return(MagickFalse);
+ }
i--;
break;
}
@@ -1860,7 +1863,10 @@
p=fgets(answer,(int) sizeof(answer),stdin);
(void) p;
if (((*answer != 'y') && (*answer != 'Y')))
- return(MagickFalse);
+ {
+ DestroyDisplay();
+ return(MagickFalse);
+ }
}
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickWand/magick-image.c
^
|
@@ -10513,6 +10513,7 @@
return(MagickFalse);
ClearMagickException(wand->exception);
(void) CopyMagickString(wand->images->magick,format,MagickPathExtent);
+ LocaleUpper(wand->images->magick);
return(MagickTrue);
}

|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickWand/mogrify.c
^
|
@@ -62,9 +62,6 @@
#include "MagickCore/thread-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/utility-private.h"
-#if defined(MAGICKCORE_HAVE_UTIME_H)
-#include <utime.h>
-#endif

/*
Constant declaration.
@@ -1995,7 +1992,7 @@
if (LocaleCompare("kmeans",option+1) == 0)
{
/*
- K-means clustering
+ K-means clustering.
*/
(void) SyncImageSettings(mogrify_info,*image,exception);
flags=ParseGeometry(argv[i+1],&geometry_info);
@@ -4110,14 +4107,7 @@
preserve_timestamp=IsStringTrue(GetImageOption(image_info,
"preserve-timestamp"));
if (preserve_timestamp != MagickFalse)
- {
- struct utimbuf
- timestamp;
-
- timestamp.actime=properties.st_atime;
- timestamp.modtime=properties.st_mtime;
- (void) utime(image->filename,×tamp);
- }
+ (void) set_file_timestamp(image->filename,&properties);
}
#endif
if (*backup_filename != '\0')
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/MagickWand/studio.h
^
|
@@ -165,9 +165,6 @@
#if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
# include <sys/types.h>
# include <sys/stat.h>
-# if defined(MAGICKCORE_HAVE_SYS_TIMEB_H)
-# include <sys/timeb.h>
-# endif
# if defined(MAGICKWAND_POSIX_SUPPORT)
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
# define dirent direct
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/README.md
^
|
@@ -1,40 +1,37 @@
# ImageMagick
-[![Build Status](https://travis-ci.org/ImageMagick/ImageMagick.svg?branch=main)](https://travis-ci.org/ImageMagick/ImageMagick)
-![main](https://github.com/ImageMagick/ImageMagick/workflows/main/badge.svg)
+[![Build Status](https://github.com/ImageMagick/ImageMagick/workflows/main/badge.svg)](https://github.com/ImageMagick/ImageMagick/actions)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/imagemagick.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:imagemagick)
+[![Donate](https://img.shields.io/badge/%24-donate-ff00ff.svg)](https://github.com/sponsors/ImageMagick)
<p align="center">
<img align="center" src="https://imagemagick.org/image/wizard.png" alt="ImageMagick logo" width="265"/>
</p>
-Use [ImageMagick®](https://imagemagick.org/) to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
+Use [ImageMagick®](https://imagemagick.org/) to create, edit, compose, or convert digital images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, WebP, HEIC, SVG, PDF, DPX, EXR and TIFF. ImageMagick can resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
#### What is ImageMagick?
-The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), NMagick (Neko/haXe), MagickNet (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), magick (R), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.
-
-ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
-
ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under a derived Apache 2.0 [license](https://imagemagick.org/script/license.php).
-The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory error and thread data race detection to prevent security vulnerabilities.
-
-The current release is the ImageMagick 7.0.11 series. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and others.
-
-The authoritative ImageMagick web site is https://imagemagick.org. The authoritative source code repository is https://github.com/ImageMagick/ImageMagick.
+ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
+The current release is the ImageMagick 7.1.0 series. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and others.
-We continue to maintain the legacy release of ImageMagick, version 6, at https://legacy.imagemagick.org.
+The authoritative ImageMagick web site is https://imagemagick.org. The authoritative source code repository is https://github.com/ImageMagick/ImageMagick. We continue to maintain the legacy release of ImageMagick, version 6, at https://legacy.imagemagick.org.
#### Features and Capabilities
-Here are just a few examples of what ImageMagick can do:
+Here are just a few [examples](https://imagemagick.org/script/examples.php) of what ImageMagick can do:
+* [Animation](https://imagemagick.org/script/command-line-options.php#bilateral-blur): non-linear, edge-preserving, and noise-reducing smoothing filter.
* [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.
+* [Color thresholding](https://imagemagick.org/script/color-management.php) force all pixels in the color range to white otherwise black.
+* [Command-line processing](https://imagemagick.org/script/command-line-processing.php) utilize ImageMagick from the command-line.
* [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.
+* [Convex hull](https://imagemagick.org/script/convex-hull.php) smallest area convex polygon containing the image foreground objects. In addition, the minimum bounding box and unrotate angle are also generated.
* [Decorate](https://legacy.imagemagick.org/Usage/crop/): add a border or frame to 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).
@@ -45,15 +42,17 @@
* [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.
+* [Histogram equalization](https://imagemagick.org/script/clahe.php) use adaptive histogram equalization to improve contrast in images.
* [Image cache](https://imagemagick.org/script/magick-cache.php): secure 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 gradients](https://imagemagick.org/script/gradient.php): create a gradual blend of one color whose shape is horizontal, vertical, circular, or elliptical.
* [Image identification](https://imagemagick.org/script/identify.php): describe the format and attributes of an image.
* [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.
* [Morphology of shapes](https://legacy.imagemagick.org/Usage/morphology/): extract features, describe shapes and recognize patterns in images.
* [Motion picture support](https://imagemagick.org/script/motion-picture.php): read and write the common image formats used in digital film work.
+* [Noise and color reduction](https://legacy.imagemagick.org/Usage/transform/#vision) Kuwahara Filter, mean-shift.
* [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.
* [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.
@@ -72,9 +71,9 @@
Want more performance from ImageMagick? Try these options:
-* add more memory to your system, see the pixel cache;
-* add more cores to your system, see threads of execution support;
-* reduce lock contention with the tcmalloc memory allocation library;
-* push large images to a solid-state drive, see large image support.
+* add more memory to your system, see the [pixel cache](https://imagemagick.org/script/architecture.php#cache);
+* add more cores to your system, see [threads of execution support](https://imagemagick.org/script/architecture.php#threads);
+* reduce lock contention with the [tcmalloc](http://goog-perftools.sourceforge.net/doc/tcmalloc.html) memory allocation library;
+* push large images to a solid-state drive, see [large image support](https://imagemagick.org/script/architecture.php#tera-pixel).
-If these options are prohibitive, you can reduce the quality of the image results. The default build is Q16 HDRI. If you disable HDRI, you use half the memory and instead of predominately floating point operations, you use the typically more efficient integer operations. The tradeoff is reduced precision and you cannot process out of range pixel values (e.g. negative). If you build the Q8 non-HDRI version of ImageMagick, you again reduce the memory requirements in half-- and once again there is a tradeoff, even less precision and no out of range pixel values. For a Q8 non-HDRI build of ImageMagick, use these configure script options: --with-quantum-depth=8 --disable-hdri.
+If these options are prohibitive, you can reduce the quality of the image results. The default build is Q16 HDRI. If you disable [HDRI](https://imagemagick.org/script/high-dynamic-range.php), you use half the memory and instead of predominately floating point operations, you use the typically more efficient integer operations. The tradeoff is reduced precision and you cannot process out of range pixel values (e.g. negative). If you build the Q8 non-HDRI version of ImageMagick, you again reduce the memory requirements in half-- and once again there is a tradeoff, even less precision and no out of range pixel values. For a Q8 non-HDRI build of ImageMagick, use these configure script options: --with-quantum-depth=8 --disable-hdri.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/README.txt
^
|
@@ -55,7 +55,7 @@
* Animation: create a GIF animation sequence from a group of images.
* Text & comments: insert descriptive or artistic text in an image.
* Image gradients: create a gradual blend of one color whose shape is
- horizontal, vertical, circular, or ellipical.
+ horizontal, vertical, circular, or elliptical.
* Image identification: describe the format and attributes of an image.
* Composite: overlap one image over another.
* Montage: juxtapose image thumbnails on an image canvas.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/aai.c
^
|
@@ -374,7 +374,8 @@
/*
Write AAI header.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobLSBLong(image,(unsigned int) image->columns);
(void) WriteBlobLSBLong(image,(unsigned int) image->rows);
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/art.c
^
|
@@ -318,7 +318,8 @@
return(status);
if ((image->columns > 65535UL) || (image->rows > 65535UL))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) SetImageType(image,BilevelType,exception);
image->endian=MSBEndian;
image->depth=1;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/avs.c
^
|
@@ -376,7 +376,8 @@
/*
Write AVS header.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobMSBLong(image,(unsigned int) image->columns);
(void) WriteBlobMSBLong(image,(unsigned int) image->rows);
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/bgr.c
^
|
@@ -1147,7 +1147,8 @@
/*
Convert MIFF to BGR raster pixels.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((LocaleCompare(image_info->magick,"BGRA") == 0) &&
(image->alpha_trait == UndefinedPixelTrait))
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/cin.c
^
|
@@ -410,6 +410,7 @@
*q;
size_t
+ extent,
length;
ssize_t
@@ -749,16 +750,18 @@
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- quantum_info->quantum=32;
- quantum_info->pack=MagickFalse;
+ SetQuantumQuantum(quantum_info,32);
+ SetQuantumPack(quantum_info,MagickFalse);
quantum_type=RGBQuantum;
- length=GetQuantumExtent(image,quantum_info,quantum_type);
+ extent=GetQuantumExtent(image,quantum_info,quantum_type);
length=GetBytesPerRow(image->columns,3,image->depth,MagickTrue);
if (cin.image.number_channels == 1)
{
quantum_type=GrayQuantum;
length=GetBytesPerRow(image->columns,1,image->depth,MagickTrue);
}
+ if (length > extent)
+ status=SetQuantumPad(image,quantum_info,length-extent);
pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/cip.c
^
|
@@ -226,7 +226,8 @@
(void) FormatLocaleString(buffer,MagickPathExtent,"<Depth>2</Depth>\n");
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<Data>");
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/coders-private.h
^
|
@@ -16,6 +16,10 @@
#ifndef MAGICK_CODERS_PRIVATE_H
#define MAGICK_CODERS_PRIVATE_H
+#include "MagickCore/attribute.h"
+#include "MagickCore/property.h"
+#include "MagickCore/string_.h"
+
#define MagickCoderHeader(coder,offset,magic) { coder, offset, \
(const unsigned char *) (magic), sizeof(magic)-1 },
@@ -27,4 +31,22 @@
extern ModuleExport void \
Unregister ## coder ## Image(void);
+static inline ImageType IdentifyImageCoderType(const Image *image,
+ ExceptionInfo *exception)
+{
+ const char
+ *value;
+
+ ImageType
+ type;
+
+ type=IdentifyImageType(image,exception);
+ if ((type != GrayscaleType) && (type != BilevelType))
+ return(type);
+ value=GetImageProperty(image,"colorspace:auto-grayscale",exception);
+ if (IsStringFalse(value) == MagickFalse)
+ return(type);
+ return(TrueColorType);
+}
+
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/cut.c
^
|
@@ -56,6 +56,7 @@
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
@@ -70,6 +71,7 @@
#include "MagickCore/module.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
+#include "coders/coders-private.h"

typedef struct
{
@@ -611,8 +613,12 @@
if(palette==NULL)
{ /*attempt to detect binary (black&white) images*/
+ ImageType
+ type;
+
+ type=IdentifyImageCoderType(image,exception);
if ((image->storage_class == PseudoClass) &&
- (SetImageGray(image,exception) != MagickFalse))
+ (IsGrayImageType(type) != MagickFalse))
{
if(GetCutColors(image,exception)==2)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/dcm.c
^
|
@@ -49,6 +49,7 @@
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colormap-private.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
@@ -58,6 +59,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
@@ -68,7 +70,7 @@
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"

/*
Dicom medical image declarations.
@@ -3022,7 +3024,7 @@
if (stream_info != (DCMStreamInfo *) NULL) \
stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info); \
if (stack != (LinkedListInfo *) NULL) \
- DestroyLinkedList(stack,RelinquishMagickMemory); \
+ stack=DestroyLinkedList(stack,RelinquishMagickMemory); \
ThrowReaderException((exception),(message)); \
}
@@ -4057,6 +4059,9 @@
}
for (scene=0; scene < (ssize_t) number_scenes; scene++)
{
+ ImageType
+ type;
+
image->columns=info.width;
image->rows=info.height;
image->depth=info.depth;
@@ -4162,13 +4167,11 @@
}
if ((info.samples_per_pixel > 1) && (image->interlace == PlaneInterlace))
{
- ssize_t
- x;
-
Quantum
*q;
ssize_t
+ x,
y;
/*
@@ -4271,7 +4274,8 @@
exception);
}
}
- if (SetImageGray(image,exception) != MagickFalse)
+ type=IdentifyImageCoderType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
(void) SetImageColorspace(image,GRAYColorspace,exception);
if (EOFBlob(image) != MagickFalse)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/dds.c
^
|
@@ -284,6 +284,15 @@
a[4];
} DDSColors;
+typedef struct _BC7Colors
+{
+ unsigned char
+ r[6],
+ g[6],
+ b[6],
+ a[6];
+} BC7Colors;
+
typedef struct _DDSVector4
{
float
@@ -314,12 +323,24 @@
DDSSourceBlock sources[2];
} DDSSingleColorLookup;
+typedef struct _BC7ModeInfo
+{
+ unsigned char
+ partition_bits,
+ num_subsets,
+ color_precision,
+ alpha_precision,
+ num_pbits,
+ index_precision,
+ index2_precision;
+} BC7ModeInfo;
+
typedef MagickBooleanType
- DDSDecoder(const ImageInfo *,Image *,DDSInfo *,const MagickBooleanType,
+ DDSDecoder(const ImageInfo *,Image *,const DDSInfo *,const MagickBooleanType,
ExceptionInfo *);
typedef MagickBooleanType
- DDSPixelDecoder(Image *,DDSInfo *,ExceptionInfo *);
+ DDSPixelDecoder(Image *,const DDSInfo *,ExceptionInfo *);
static const DDSSingleColorLookup DDSLookup_5_4[] =
{
@@ -849,6 +870,209 @@
DDSLookup_5_4
};
+static const unsigned char BC7_weight2[] = { 0, 21, 43, 64 };
+static const unsigned char BC7_weight3[] = { 0, 9, 18, 27, 37, 46, 55, 64 };
+static const unsigned char BC7_weight4[] = { 0, 4, 9, 13, 17, 21, 26, 30, 34,
+ 38, 43, 47, 51, 55, 60, 64 };
+
+/* stores info for each mode of BC7 */
+static const BC7ModeInfo BC7_mode_info[8] =
+{
+ { 4, 3, 4, 0, 6, 3, 0 }, /* mode 0 */
+ { 6, 2, 6, 0, 2, 3, 0 }, /* mode 1 */
+ { 6, 3, 5, 0, 0, 2, 0 }, /* mode 2 */
+ { 6, 2, 7, 0, 4, 2, 0 }, /* mode 3 */
+ { 0, 1, 5, 6, 0, 2, 3 }, /* mode 4 */
+ { 0, 1, 7, 8, 0, 2, 2 }, /* mode 5 */
+ { 0, 1, 7, 7, 2, 4, 0 }, /* mode 6 */
+ { 6, 2, 5, 5, 4, 2, 0 }, /* mode 7 */
+};
+
+static const unsigned char BC7_partition_table[2][64][16] =
+{
+ { /* BC7 Partition Set for 2 Subsets */
+ { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 },
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 },
+ { 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 },
+ { 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1 },
+ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1 },
+ { 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1 },
+ { 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1 },
+ { 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0 },
+ { 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0 },
+ { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 },
+ { 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1 },
+ { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 },
+ { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0 },
+ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0 },
+ { 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
+ { 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0 },
+ { 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0 },
+ { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1 },
+ { 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0 },
+ { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0 },
+ { 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0 },
+ { 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 },
+ { 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 },
+ { 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 },
+ { 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0 },
+ { 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 },
+ { 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 },
+ { 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0 },
+ { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 },
+ { 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1 },
+ { 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1 },
+ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 },
+ { 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0 },
+ { 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0 },
+ { 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 },
+ { 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1 },
+ { 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0 },
+ { 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0 },
+ { 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1 },
+ { 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1 },
+ { 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1 },
+ { 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 },
+ { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
+ { 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0 },
+ { 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1 }
+ },
+
+ { /* BC7 Partition Set for 3 Subsets */
+ { 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 1, 2, 2, 2, 2 },
+ { 0, 0, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1 },
+ { 0, 0, 0, 0, 2, 0, 0, 1, 2, 2, 1, 1, 2, 2, 1, 1 },
+ { 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 1, 1, 0, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2 },
+ { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 2, 2 },
+ { 0, 0, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2 },
+ { 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2 },
+ { 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2 },
+ { 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 2 },
+ { 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2 },
+ { 0, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 0, 2, 2, 2, 0 },
+ { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2 },
+ { 0, 1, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 0 },
+ { 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2 },
+ { 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1 },
+ { 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2, 0, 2, 2, 2 },
+ { 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 1, 2, 2, 2, 1 },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 2 },
+ { 0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 1, 0, 2, 2, 1, 0 },
+ { 0, 1, 2, 2, 0, 1, 2, 2, 0, 0, 1, 1, 0, 0, 0, 0 },
+ { 0, 0, 1, 2, 0, 0, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2 },
+ { 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 2, 1, 0, 1, 1, 0 },
+ { 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 2, 1 },
+ { 0, 0, 2, 2, 1, 1, 0, 2, 1, 1, 0, 2, 0, 0, 2, 2 },
+ { 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 2, 2, 2, 2 },
+ { 0, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 2, 0, 0, 1, 1 },
+ { 0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 1, 1, 2, 2, 2, 1 },
+ { 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 2, 2, 2 },
+ { 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 1, 2, 0, 0, 1, 1 },
+ { 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 2, 2, 0, 2, 2, 2 },
+ { 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0 },
+ { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0 },
+ { 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0 },
+ { 0, 1, 2, 0, 2, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0 },
+ { 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1 },
+ { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0, 1, 1 },
+ { 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1 },
+ { 0, 0, 2, 2, 1, 1, 2, 2, 0, 0, 2, 2, 1, 1, 2, 2 },
+ { 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1 },
+ { 0, 2, 2, 0, 1, 2, 2, 1, 0, 2, 2, 0, 1, 2, 2, 1 },
+ { 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 1 },
+ { 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1 },
+ { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2 },
+ { 0, 2, 2, 2, 0, 1, 1, 1, 0, 2, 2, 2, 0, 1, 1, 1 },
+ { 0, 0, 0, 2, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 2 },
+ { 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2 },
+ { 0, 2, 2, 2, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2 },
+ { 0, 0, 0, 2, 1, 1, 1, 2, 1, 1, 1, 2, 0, 0, 0, 2 },
+ { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 1, 2 },
+ { 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2 },
+ { 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2 },
+ { 0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 2, 2 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2 },
+ { 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1 },
+ { 0, 2, 2, 2, 1, 2, 2, 2, 0, 2, 2, 2, 1, 2, 2, 2 },
+ { 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
+ { 0, 1, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 2, 2, 2, 0 }
+ }
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/dib.c
^
|
@@ -1134,7 +1134,8 @@
/*
Initialize DIB raster file header.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class == DirectClass)
{
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/dng.c
^
|
@@ -73,7 +73,8 @@
#if defined(MAGICKCORE_RAW_R_DELEGATE)
#include <libraw.h>
#endif
-
+
+
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -361,6 +362,37 @@
}
}
+static void ReadLibRawThumbnail(const ImageInfo *image_info,Image *image,
+ libraw_data_t *raw_info,ExceptionInfo *exception)
+{
+ const char
+ *option;
+
+ int
+ errcode;
+
+ libraw_processed_image_t
+ *thumbnail;
+
+ option=GetImageOption(image_info,"dng:read-thumbnail");
+ if (IsStringTrue(option) == MagickFalse)
+ return;
+ errcode=libraw_unpack_thumb(raw_info);
+ if (errcode != LIBRAW_SUCCESS)
+ return;
+ thumbnail=libraw_dcraw_make_mem_thumb(raw_info,&errcode);
+ if (errcode == LIBRAW_SUCCESS)
+ {
+ StringInfo
+ *profile;
+
+ profile=BlobToStringInfo(thumbnail->data,thumbnail->data_size);
+ (void) SetImageProfile(image,"dng:thumbnail",profile,exception);
+ }
+ if (thumbnail != (libraw_processed_image_t *) NULL)
+ libraw_dcraw_clear_mem(thumbnail);
+}
+
#endif
static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
@@ -447,6 +479,7 @@
image->page.height=raw_info->sizes.raw_height;
image->page.x=raw_info->sizes.left_margin;
image->page.y=raw_info->sizes.top_margin;
+ ReadLibRawThumbnail(image_info,image,raw_info,exception);
if (image_info->ping != MagickFalse)
{
libraw_close(raw_info);
@@ -563,7 +596,8 @@
return(InvokeDNGDelegate(image_info,image,exception));
#endif
}
-
+
+
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -746,7 +780,8 @@
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
-
+
+
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/dpx.c
^
|
@@ -67,6 +67,7 @@
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer-private.h"
+#include "coders/coders-private.h"

/*
Define declaration.
@@ -1243,6 +1244,7 @@
SetQuantumQuantum(quantum_info,32);
SetQuantumPack(quantum_info,dpx.image.image_element[n].packing == 0 ?
MagickTrue : MagickFalse);
+ status=SetQuantumPad(image,quantum_info,0);
pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
@@ -1664,12 +1666,18 @@
}
default:
{
+ ImageType
+ type;
+
dpx.image.image_element[i].descriptor=RGBComponentType;
if (image->alpha_trait != UndefinedPixelTrait)
dpx.image.image_element[i].descriptor=RGBAComponentType;
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
if ((image_info->type != TrueColorType) &&
(image->alpha_trait == UndefinedPixelTrait) &&
- (SetImageGray(image,exception) != MagickFalse))
+ (IsGrayImageType(type) != MagickFalse))
dpx.image.image_element[i].descriptor=LumaComponentType;
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/emf.c
^
|
@@ -414,7 +414,8 @@
}
ReadFile(hFile,pBits,dwSize,&dwSize,NULL);
CloseHandle(hFile);
- if (((PAPMHEADER) pBits)->dwKey != 0x9ac6cdd7l)
+ if ((((PAPMHEADER) pBits)->dwKey != 0x9ac6cdd7l) ||
+ (((PAPMHEADER) pBits)->wInch == 0))
{
pBits=(BYTE *) DestroyString((char *) pBits);
return((HENHMETAFILE) NULL);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/fax.c
^
|
@@ -388,7 +388,8 @@
/*
Convert MIFF to monochrome.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
status=HuffmanEncodeImage(write_info,image,image,exception);
if (GetNextImageInList(image) == (Image *) NULL)
break;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/fits.c
^
|
@@ -65,7 +65,7 @@
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"

/*
Forward declarations.
@@ -636,15 +636,18 @@
*fits_info,
header[FITSBlocksize];
+ const Quantum
+ *p;
+
+ ImageType
+ type;
+
MagickBooleanType
status;
QuantumInfo
*quantum_info;
- const Quantum
- *p;
-
size_t
length;
@@ -670,7 +673,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Allocate image memory.
*/
@@ -699,8 +703,9 @@
image->depth));
CopyFitsRecord(fits_info,header,offset);
offset+=80;
+ type=IdentifyImageCoderType(image,exception);
(void) FormatLocaleString(header,FITSBlocksize,"NAXIS = %10lu",
- SetImageGray(image,exception) != MagickFalse ? 2UL : 3UL);
+ (type == GrayscaleType) || (type == BilevelType) ? 2UL : 3UL);
CopyFitsRecord(fits_info,header,offset);
offset+=80;
(void) FormatLocaleString(header,FITSBlocksize,"NAXIS1 = %10lu",
@@ -711,7 +716,7 @@
(unsigned long) image->rows);
CopyFitsRecord(fits_info,header,offset);
offset+=80;
- if (SetImageGray(image,exception) == MagickFalse)
+ if ((type != GrayscaleType) && (type != BilevelType))
{
(void) FormatLocaleString(header,FITSBlocksize,
"NAXIS3 = %10lu",3UL);
@@ -750,7 +755,7 @@
Convert image to fits scale PseudoColor class.
*/
pixels=(unsigned char *) GetQuantumPixels(quantum_info);
- if (SetImageGray(image,exception) != MagickFalse)
+ if (IsGrayImageType(type) != MagickFalse)
{
length=GetQuantumExtent(image,quantum_info,GrayQuantum);
for (y=(ssize_t) image->rows-1; y >= 0; y--)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/fl32.c
^
|
@@ -192,17 +192,20 @@
(void) CloseBlob(image);
return(GetFirstImageInList(image));
}
+ status=SetImageExtent(image,image->columns,image->rows,exception);
+ if (status == MagickFalse)
+ return(DestroyImageList(image));
switch (image->number_channels)
{
case 1:
{
- image->colorspace=GRAYColorspace;
+ (void) SetImageColorspace(image,GRAYColorspace,exception);
quantum_type=GrayQuantum;
break;
}
case 2:
{
- image->colorspace=GRAYColorspace;
+ (void) SetImageColorspace(image,GRAYColorspace,exception);
image->alpha_trait=BlendPixelTrait;
quantum_type=GrayAlphaQuantum;
break;
@@ -225,9 +228,6 @@
break;
}
}
- status=SetImageExtent(image,image->columns,image->rows,exception);
- if (status == MagickFalse)
- return(DestroyImageList(image));
(void) ResetImagePixels(image,exception);
/*
Convert FL32 image to pixel packets.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/fpx.c
^
|
@@ -59,6 +59,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
@@ -68,7 +69,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"
#if defined(MAGICKCORE_FPX_DELEGATE)
#if !defined(vms) && !defined(macintosh) && !defined(MAGICKCORE_WINDOWS_SUPPORT)
#include <fpxlib.h>
@@ -441,7 +442,7 @@
else
{
index=ScaleCharToQuantum(*r);
- SetPixelBlack(image,index,q);
+ SetPixelIndex(image,index,q);
SetPixelRed(image,index,q);
SetPixelGreen(image,index,q);
SetPixelBlue(image,index,q);
@@ -766,6 +767,9 @@
*label,
*option;
+ const Quantum
+ *p;
+
FPXCompressionOption
compression;
@@ -781,6 +785,9 @@
FPXSummaryInformation
summary_info;
+ ImageType
+ type;
+
MagickBooleanType
status;
@@ -790,9 +797,6 @@
QuantumType
quantum_type;
- const Quantum
- *p;
-
ssize_t
i;
@@ -824,7 +828,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) CloseBlob(image);
/*
Initialize FPX toolkit.
@@ -839,8 +844,10 @@
colorspace.numberOfComponents=3;
if (image->alpha_trait != UndefinedPixelTrait)
colorspace.numberOfComponents=4;
- if ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse))
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
{
colorspace.numberOfComponents=1;
colorspace.theComponents[0].myColor=MONOCHROME;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/gif.c
^
|
@@ -1613,7 +1613,8 @@
imageListLength=GetImageListLength(image);
do
{
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
opacity=(-1);
if (IsImageOpaque(image,exception) != MagickFalse)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/gray.c
^
|
@@ -145,7 +145,7 @@
image=AcquireImage(image_info,exception);
if ((image->columns == 0) || (image->rows == 0))
ThrowReaderException(OptionError,"MustSpecifyImageSize");
- image->colorspace=GRAYColorspace;
+ (void) SetImageColorspace(image,GRAYColorspace,exception);
if (image_info->interlace != PartitionInterlace)
{
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/heic.c
^
|
@@ -840,6 +840,7 @@
struct heif_image *heif_image,ExceptionInfo *exception)
{
int
+ bit_depth,
p_y,
p_cb,
p_cr;
@@ -859,18 +860,19 @@
*q_cr;
status=MagickTrue;
+ bit_depth=8;
error=heif_image_add_plane(heif_image,heif_channel_Y,(int) image->columns,
- (int) image->rows,8);
+ (int) image->rows,bit_depth);
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
return(status);
error=heif_image_add_plane(heif_image,heif_channel_Cb,
- ((int) image->columns+1)/2,((int) image->rows+1)/2,8);
+ ((int) image->columns+1)/2,((int) image->rows+1)/2,bit_depth);
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
return(status);
error=heif_image_add_plane(heif_image,heif_channel_Cr,
- ((int) image->columns+1)/2,((int) image->rows+1)/2,8);
+ ((int) image->columns+1)/2,((int) image->rows+1)/2,bit_depth);
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
return(status);
@@ -1057,22 +1059,13 @@
colorspace=heif_colorspace_YCbCr;
lossless=image_info->quality == 100 ? MagickTrue : MagickFalse;
chroma=lossless ? heif_chroma_444 : heif_chroma_420;
-
/*
Get encoder for the specified format.
*/
#if LIBHEIF_NUMERIC_VERSION > 0x01060200
if (encode_avif != MagickFalse)
- {
- error=heif_context_get_encoder_for_format(heif_context,
- heif_compression_AV1,&heif_encoder);
- if (IssRGBCompatibleColorspace(image->colorspace) != MagickFalse)
- {
- colorspace=heif_colorspace_RGB;
- chroma=(image->alpha_trait == UndefinedPixelTrait) ?
- heif_chroma_interleaved_RGB : heif_chroma_interleaved_RGBA;
- }
- }
+ error=heif_context_get_encoder_for_format(heif_context,
+ heif_compression_AV1,&heif_encoder);
else
#endif
error=heif_context_get_encoder_for_format(heif_context,
@@ -1080,13 +1073,22 @@
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
break;
- if ((colorspace == heif_colorspace_YCbCr) &&
- (image->colorspace != YCbCrColorspace))
+ if (image->alpha_trait == BlendPixelTrait)
{
- status=TransformImageColorspace(image,YCbCrColorspace,exception);
- if (status == MagickFalse)
- break;
+ colorspace=heif_colorspace_RGB;
+ chroma=heif_chroma_interleaved_RGBA;
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ status=TransformImageColorspace(image,sRGBColorspace,exception);
+ }
+ else if (IssRGBCompatibleColorspace(image->colorspace) != MagickFalse)
+ {
+ colorspace=heif_colorspace_RGB;
+ chroma=heif_chroma_interleaved_RGB;
}
+ else if (image->colorspace != YCbCrColorspace)
+ status=TransformImageColorspace(image,YCbCrColorspace,exception);
+ if (status == MagickFalse)
+ break;
/*
Initialize HEIF encoder context.
*/
@@ -1095,7 +1097,6 @@
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
break;
-
#if LIBHEIF_NUMERIC_VERSION >= 0x01040000
profile=GetImageProfile(image,"icc");
if (profile != (StringInfo *) NULL)
@@ -1108,20 +1109,17 @@
status=WriteHEICImageRGBA(image,heif_image,exception);
if (status == MagickFalse)
break;
-
/*
Code and actually write the HEIC image
*/
if (lossless != MagickFalse)
- error=heif_encoder_set_lossless(heif_encoder, 1);
+ error=heif_encoder_set_lossless(heif_encoder,1);
else if (image_info->quality != UndefinedCompressionQuality)
error=heif_encoder_set_lossy_quality(heif_encoder,(int)
image_info->quality);
-
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
break;
-
#if LIBHEIF_NUMERIC_VERSION > 0x01060200
if (encode_avif != MagickFalse)
{
@@ -1136,7 +1134,6 @@
if (status == MagickFalse)
break;
}
-
option=GetImageOption(image_info,"heic:chroma");
if (option != (char *) NULL)
{
@@ -1147,14 +1144,12 @@
}
}
#endif
-
error=heif_context_encode_image(heif_context,heif_image,heif_encoder,
(const struct heif_encoding_options *) NULL,
(struct heif_image_handle **) NULL);
status=IsHeifSuccess(image,&error,exception);
if (status == MagickFalse)
break;
-
#if LIBHEIF_NUMERIC_VERSION >= 0x01030000
if (image->profiles != (void *) NULL)
WriteProfile(heif_context,image,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/html.c
^
|
@@ -244,7 +244,8 @@
if (status == MagickFalse)
return(status);
(void) CloseBlob(image);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
*url='\0';
if ((LocaleCompare(image_info->magick,"FTP") == 0) ||
(LocaleCompare(image_info->magick,"HTTP") == 0))
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/ipl.c
^
|
@@ -246,14 +246,17 @@
if((ipl_info.width == 0UL) || (ipl_info.height == 0UL))
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
ipl_info.colors=ReadBlobLong(image);
- if(ipl_info.colors == 3){ SetImageColorspace(image,sRGBColorspace,exception);}
- else { image->colorspace = GRAYColorspace; }
+ if (ipl_info.colors == 3)
+ {
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ SetImageColorspace(image,sRGBColorspace,exception);
+ }
+ else
+ image->colorspace = GRAYColorspace;
ipl_info.z=ReadBlobLong(image);
ipl_info.time=ReadBlobLong(image);
-
ipl_info.byteType=ReadBlobLong(image);
-
/* Initialize Quantum Info */
switch (ipl_info.byteType) {
@@ -586,7 +589,8 @@
ipl_info.time = 1;
ipl_info.width = (unsigned int) image->columns;
ipl_info.height = (unsigned int) image->rows;
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if(IssRGBCompatibleColorspace(image->colorspace) != MagickFalse) { ipl_info.colors = 3; }
else{ ipl_info.colors = 1; }
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/jbig.c
^
|
@@ -465,7 +465,8 @@
/*
Allocate pixel data.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
number_packets=(image->columns+7)/8;
pixel_info=AcquireVirtualMemory(number_packets,image->rows*sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/jp2.c
^
|
@@ -986,7 +986,8 @@
jp2_colorspace=OPJ_CLRSPC_GRAY;
}
else
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image->alpha_trait != UndefinedPixelTrait)
channels++;
}
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/jpeg.c
^
|
@@ -85,6 +85,7 @@
#include "MagickCore/utility.h"
#include "MagickCore/xml-tree.h"
#include "MagickCore/xml-tree-private.h"
+#include "coders/coders-private.h"
#include <setjmp.h>
#if defined(MAGICKCORE_JPEG_DELEGATE)
#define JPEG_INTERNAL_OPTIONS
@@ -340,8 +341,8 @@
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"[%s] JPEG Trace: \"%s\"",image->filename,message);
if (client_info->finished != MagickFalse)
- (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageWarning,
- (char *) message,"`%s'",image->filename);
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ CorruptImageWarning,(char *) message,"`%s'",image->filename);
else
(void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError,
(char *) message,"`%s'",image->filename);
@@ -371,7 +372,7 @@
longjmp(client_info->error_recovery,1);
}
-static MagickBooleanType JPEGWarningHandler(j_common_ptr jpeg_info,int level)
+static void JPEGWarningHandler(j_common_ptr jpeg_info,int level)
{
#define JPEGExcessiveWarnings 1000
@@ -398,8 +399,8 @@
*/
(jpeg_info->err->format_message)(jpeg_info,message);
if (jpeg_info->err->num_warnings++ < JPEGExcessiveWarnings)
- ThrowBinaryException(CorruptImageWarning,(char *) message,
- image->filename);
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ CorruptImageWarning,message,"`%s'",image->filename);
}
else
if (level >= jpeg_info->err->trace_level)
@@ -412,7 +413,6 @@
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"[%s] JPEG Trace: \"%s\"",image->filename,message);
}
- return(MagickTrue);
}
static boolean ReadProfileData(j_decompress_ptr jpeg_info,const size_t index,
@@ -2337,11 +2337,12 @@
ImageType
type;
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (image_info->type == TrueColorType)
break;
- type=IdentifyImageType(image,exception);
- if ((type == GrayscaleType) || (type == BilevelType))
+ type=IdentifyImageCoderType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
{
jpeg_info->input_components=1;
jpeg_info->in_color_space=JCS_GRAYSCALE;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/json.c
^
|
@@ -74,6 +74,7 @@
#include "MagickCore/utility.h"
#include "MagickCore/version.h"
#include "MagickCore/module.h"
+#include "coders/coders-private.h"
/*
Typedef declarations.
@@ -1039,7 +1040,7 @@
}
JSONFormatLocaleFile(file," \"units\": %s,\n",CommandOptionToMnemonic(
MagickResolutionOptions,(ssize_t) image->units));
- type=IdentifyImageType(image,exception);
+ type=IdentifyImageCoderType(image,exception);
JSONFormatLocaleFile(file," \"type\": %s,\n",CommandOptionToMnemonic(
MagickTypeOptions,(ssize_t) type));
if (image->type != type)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/jxl.c
^
|
@@ -519,6 +519,33 @@
% o image: The image.
%
*/
+
+static JxlEncoderStatus JXLWriteMetadata(const Image *image,
+ JxlEncoder *encoder)
+{
+ const StringInfo
+ *profile;
+
+ JxlColorEncoding
+ color_encoding;
+
+ JxlEncoderStatus
+ encoder_status;
+
+ profile=GetImageProfile(image,"ICC");
+ if (profile != (const StringInfo *) NULL)
+ encoder_status=JxlEncoderSetICCProfile(encoder,
+ (void*) GetStringInfoDatum(profile),GetStringInfoLength(profile));
+ else
+ {
+ memset(&color_encoding,0,sizeof(color_encoding));
+ JxlColorEncodingSetToLinearSRGB(&color_encoding,
+ IsImageGray(image) == GRAYColorspace ? JXL_TRUE : JXL_FALSE);
+ encoder_status=JxlEncoderSetColorEncoding(encoder,&color_encoding);
+ }
+ return(encoder_status);
+}
+
static MagickBooleanType WriteJXLImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
@@ -635,6 +662,13 @@
option=GetImageOption(image_info,"jxl:effort");
if (option != (const char *) NULL)
JxlEncoderOptionsSetEffort(encoder_options,StringToInteger(option));
+ encoder_status=JXLWriteMetadata(image,encoder);
+ if (encoder_status != JXL_ENC_SUCCESS)
+ {
+ JxlThreadParallelRunnerDestroy(runner);
+ JxlEncoderDestroy(encoder);
+ ThrowWriterException(CoderError,"UnableToWriteImageData");
+ }
bytes_per_row=image->columns*
((image->alpha_trait == BlendPixelTrait) ? 4 : 3)*
((format.data_type == JXL_TYPE_FLOAT) ? sizeof(float) :
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/kernel.c
^
|
@@ -181,7 +181,8 @@
/*
Write KERNEL header.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) FormatLocaleString(buffer,MagickPathExtent,"%gx%g:",(double)
image->columns,(double) image->rows);
(void) WriteBlobString(image,buffer);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/map.c
^
|
@@ -388,7 +388,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Allocate colormap.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/mat.c
^
|
@@ -77,6 +77,7 @@
#include "MagickCore/timer-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility-private.h"
+#include "coders/coders-private.h"
#if defined(MAGICKCORE_ZLIB_DELEGATE)
#include "zlib.h"
#endif
@@ -1645,6 +1646,9 @@
char
padding;
+ ImageType
+ type;
+
MagickBooleanType
is_gray;
@@ -1660,8 +1664,11 @@
unsigned int
z;
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
- is_gray=SetImageGray(image,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ type=IdentifyImageCoderType(image,exception);
+ is_gray=(IsGrayImageType(type) != MagickFalse) ? MagickTrue :
+ MagickFalse;
z=(is_gray != MagickFalse) ? 0 : 3;
/*
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/meta.c
^
|
@@ -2356,8 +2356,8 @@
if (profile == (StringInfo *) NULL)
ThrowWriterException(CoderError,"No8BIMDataIsAvailable");
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
+ assert(exception->signature == MagickCoreSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
info=GetStringInfoDatum(profile);
length=GetStringInfoLength(profile);
length=GetIPTCStream(&info,length);
@@ -2376,8 +2376,8 @@
if (profile == (StringInfo *) NULL)
ThrowWriterException(CoderError,"No8BIMDataIsAvailable");
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
+ assert(exception->signature == MagickCoreSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
buff=AcquireImage((ImageInfo *) NULL,exception);
@@ -2410,8 +2410,8 @@
if (length == 0)
ThrowWriterException(CoderError,"NoIPTCProfileAvailable");
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
+ assert(exception->signature == MagickCoreSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
buff=AcquireImage((ImageInfo *) NULL,exception);
@@ -2437,8 +2437,8 @@
if (profile == (StringInfo *) NULL)
ThrowWriterException(CoderError,"NoAPP1DataIsAvailable");
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
+ assert(exception->signature == MagickCoreSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
(void) WriteBlob(image,GetStringInfoLength(profile),
@@ -2456,8 +2456,8 @@
if (profile == (StringInfo *) NULL)
ThrowWriterException(CoderError,"NoColorProfileIsAvailable");
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickCoreSignature);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
+ assert(exception->signature == MagickCoreSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
(void) WriteBlob(image,GetStringInfoLength(profile),
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/mono.c
^
|
@@ -315,7 +315,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/msl.c
^
|
@@ -7637,6 +7637,7 @@
#endif
ThrowMSLException(DelegateFatalError,reason,"SAX error");
va_end(operands);
+ xmlStopParser(msl_info->parser);
}
static void MSLCDataBlock(void *context,const xmlChar *value,int length)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/mtv.c
^
|
@@ -378,7 +378,8 @@
/*
Allocate memory for pixels.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
pixels=(unsigned char *) AcquireQuantumMemory(image->columns,
3UL*sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/otb.c
^
|
@@ -335,7 +335,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/palm.c
^
|
@@ -771,7 +771,8 @@
imageListLength=GetImageListLength(image);
do
{
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
count=GetNumberColors(image,NULL,exception);
for (bits_per_pixel=1; (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
if (bits_per_pixel > 16)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pcl.c
^
|
@@ -734,7 +734,8 @@
/*
Initialize the printer.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobString(image,"\033E"); /* printer reset */
(void) WriteBlobString(image,"\033*r3F"); /* set presentation mode */
(void) FormatLocaleString(buffer,MagickPathExtent,"\033*r%.20gs%.20gT",
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pcx.c
^
|
@@ -943,7 +943,8 @@
(SetImageMonochrome(image,exception) != MagickFalse))
pcx_info.bits_per_pixel=1;
else
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
pcx_info.left=0;
pcx_info.top=0;
pcx_info.right=(unsigned short) (image->columns-1);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pdb.c
^
|
@@ -800,7 +800,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (SetImageMonochrome(image,exception) != MagickFalse) {
bits_per_pixel=1;
} else if (image->colors <= 4) {
@@ -883,7 +884,8 @@
(void) memset(buffer,0,512*sizeof(*buffer));
(void) memset(scanline,0,image->columns*packet_size*sizeof(*scanline));
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert to GRAY raster scanline.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pdf.c
^
|
@@ -86,6 +86,7 @@
#include "MagickCore/utility.h"
#include "MagickCore/xml-tree-private.h"
#include "coders/bytebuffer-private.h"
+#include "coders/coders-private.h"
#include "coders/ghostscript-private.h"

/*
@@ -300,6 +301,8 @@
break;
name[i++]=(char) c;
}
+ if (c == EOF)
+ break;
name[i]='\0';
value=ConstantString(name);
(void) SubstituteString(&value,"#20"," ");
@@ -586,6 +589,7 @@
if ((image_info->page != (char *) NULL) || (fitPage != MagickFalse))
(void) FormatLocaleString(options,MagickPathExtent,"-g%.20gx%.20g ",
(double) page.width,(double) page.height);
+ (void) ConcatenateMagickString(options,"-dPrinted=false ",MagickPathExtent);
if (fitPage != MagickFalse)
(void) ConcatenateMagickString(options,"-dPSFitPage ",MagickPathExtent);
if (pdf_info.cropbox != MagickFalse)
@@ -660,19 +664,37 @@
(void) RelinquishUniqueFileResource(read_info->filename);
}
else
- for (i=1; ; i++)
{
- (void) InterpretImageFilename(image_info,image,filename,(int) i,
- read_info->filename,exception);
- if (IsGhostscriptRendered(read_info->filename) == MagickFalse)
- break;
- read_info->blob=NULL;
- read_info->length=0;
- next=ReadImage(read_info,exception);
- (void) RelinquishUniqueFileResource(read_info->filename);
+ next=(Image *) NULL;
+ for (i=1; ; i++)
+ {
+ (void) InterpretImageFilename(image_info,image,filename,(int) i,
+ read_info->filename,exception);
+ if (IsGhostscriptRendered(read_info->filename) == MagickFalse)
+ break;
+ read_info->blob=NULL;
+ read_info->length=0;
+ next=ReadImage(read_info,exception);
+ (void) RelinquishUniqueFileResource(read_info->filename);
+ if (next == (Image *) NULL)
+ break;
+ AppendImageToList(&pdf_image,next);
+ }
+ /* Clean up remaining files */
if (next == (Image *) NULL)
- break;
- AppendImageToList(&pdf_image,next);
+ {
+ ssize_t
+ j;
+
+ for (j=i+1; ; j++)
+ {
+ (void) InterpretImageFilename(image_info,image,filename,(int) j,
+ read_info->filename,exception);
+ if (IsGhostscriptRendered(read_info->filename) == MagickFalse)
+ break;
+ (void) RelinquishUniqueFileResource(read_info->filename);
+ }
+ }
}
read_info=DestroyImageInfo(read_info);
if (pdf_image == (Image *) NULL)
@@ -1200,7 +1222,7 @@
return(default_title);
}
-static const StringInfo* GetCompatibleColorProfile(const Image* image)
+static const StringInfo *GetCompatibleColorProfile(const Image* image)
{
ColorspaceType
colorspace;
@@ -1432,7 +1454,11 @@
version=1.6;
for (next=image; next != (Image *) NULL; next=GetNextImageInList(next))
{
- (void) SetImageGray(next,exception);
+ ImageType type = UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(next,exception);
+ if (IsGrayImageType(type) != MagickFalse)
+ SetImageColorspace(next,GRAYColorspace,exception);
icc_profile=GetCompatibleColorProfile(next);
if (icc_profile != (StringInfo *) NULL)
{
@@ -1588,6 +1614,9 @@
Image
*tile_image;
+ ImageType
+ type;
+
MagickBooleanType
thumbnail;
@@ -1651,6 +1680,7 @@
break;
}
if (compression == JPEG2000Compression)
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Scale relative to dots-per-inch.
@@ -1957,9 +1987,11 @@
number_pixels=(MagickSizeType) image->columns*image->rows;
if ((4*number_pixels) != (MagickSizeType) ((size_t) (4*number_pixels)))
ThrowPDFException(ResourceLimitError,"MemoryAllocationFailed");
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
if ((compression == FaxCompression) || (compression == Group4Compression) ||
- ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse)))
+ (IsGrayImageType(type) != MagickFalse))
{
switch (compression)
{
@@ -2314,6 +2346,9 @@
(void) WriteBlobString(image,buffer);
device="DeviceRGB";
channels=0;
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
if (image->colorspace == CMYKColorspace)
{
device="DeviceCMYK";
@@ -2322,8 +2357,7 @@
else
if ((compression == FaxCompression) ||
(compression == Group4Compression) ||
- ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse)))
+ (IsGrayImageType(type) != MagickFalse))
{
device="DeviceGray";
channels=1;
@@ -2399,7 +2433,11 @@
&geometry.width,&geometry.height);
tile_image=ThumbnailImage(image,geometry.width,geometry.height,exception);
if (tile_image == (Image *) NULL)
- return(MagickFalse);
+ {
+ xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
+ (void) CloseBlob(image);
+ return(MagickFalse);
+ }
xref[object++]=TellBlob(image);
(void) FormatLocaleString(buffer,MagickPathExtent,"%.20g 0 obj\n",(double)
object);
@@ -2484,10 +2522,12 @@
(void) WriteBlobString(image,"stream\n");
offset=TellBlob(image);
number_pixels=(MagickSizeType) tile_image->columns*tile_image->rows;
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(tile_image,exception);
if ((compression == FaxCompression) ||
(compression == Group4Compression) ||
- ((image_info->type != TrueColorType) &&
- (SetImageGray(tile_image,exception) != MagickFalse)))
+ (IsGrayImageType(type) != MagickFalse))
{
switch (compression)
{
@@ -2509,6 +2549,7 @@
exception);
if (status == MagickFalse)
{
+ tile_image=DestroyImage(tile_image);
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
(void) CloseBlob(image);
return(MagickFalse);
@@ -2520,6 +2561,7 @@
status=InjectImageBlob(image_info,image,tile_image,"jp2",exception);
if (status == MagickFalse)
{
+ tile_image=DestroyImage(tile_image);
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
(void) CloseBlob(image);
return(MagickFalse);
@@ -2572,6 +2614,7 @@
pixel_info=RelinquishVirtualMemory(pixel_info);
if (status == MagickFalse)
{
+ tile_image=DestroyImage(tile_image);
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
(void) CloseBlob(image);
return(MagickFalse);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pgx.c
^
|
@@ -369,7 +369,8 @@
(void) FormatLocaleString(buffer,MagickPathExtent,"PG ML + %g %g %g\n",
(double) image->depth,(double) image->columns,(double) image->rows);
(void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pict.c
^
|
@@ -1729,7 +1729,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Initialize image info.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/png.c
^
|
@@ -36,9 +36,6 @@
%
%
*/
-
-#define IM
-

/*
Include declarations.
@@ -90,6 +87,7 @@
#include "MagickCore/timer-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
+#include "coders/coders-private.h"
#if defined(MAGICKCORE_PNG_DELEGATE)
/* Suppress libpng pedantic warnings that were added in
@@ -1763,11 +1761,10 @@
/*
Free a pointer. It is removed from the list at the same time.
*/
-static png_free_ptr Magick_png_free(png_structp png_ptr,png_voidp ptr)
+static void Magick_png_free(png_structp png_ptr,png_voidp ptr)
{
(void) png_ptr;
ptr=RelinquishMagickMemory(ptr);
- return((png_free_ptr) NULL);
}
#endif
@@ -1895,23 +1892,33 @@
return MagickTrue;
}
-static int PNGSetExifProfile(Image *image,png_size_t size,png_byte *data,
+static int PNGSetExifProfile(Image *image,png_byte *data,png_size_t size,
ExceptionInfo *exception)
{
StringInfo
*profile;
- unsigned char
- *p;
-
- png_byte
- *s;
-
- size_t
- i;
-
- profile=BlobToStringInfo((const void *) NULL,size+6);
+ if ((size > 6) && (data[0] == 'E') && (data[1] == 'x') && (data[2] == 'i') &&
+ (data[3] == 'f') && (data[4] == '\0') && (data[5] == '\0'))
+ profile=BlobToStringInfo((const void *) data,size);
+ else
+ {
+ unsigned char
+ *p;
+ profile=BlobToStringInfo((const void *) NULL,size+6);
+ if (profile != (StringInfo *) NULL)
+ {
+ p=GetStringInfoDatum(profile);
+ *p++ ='E';
+ *p++ ='x';
+ *p++ ='i';
+ *p++ ='f';
+ *p++ ='\0';
+ *p++ ='\0';
+ (void) CopyMagickMemory(p,data,size);
+ }
+ }
if (profile == (StringInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -1919,41 +1926,8 @@
image->filename);
return(-1);
}
- p=GetStringInfoDatum(profile);
-
- /* Initialize profile with "Exif\0\0" */
- *p++ ='E';
- *p++ ='x';
- *p++ ='i';
- *p++ ='f';
- *p++ ='\0';
- *p++ ='\0';
-
- s=data;
- i=0;
- if (size > 6)
- {
- /* Skip first 6 bytes if "Exif\0\0" is
- already present by accident
- */
- if (s[0] == 'E' && s[1] == 'x' && s[2] == 'i' &&
- s[3] == 'f' && s[4] == '\0' && s[5] == '\0')
- {
- s+=6;
- i=6;
- SetStringInfoLength(profile,size);
- p=GetStringInfoDatum(profile);
- }
- }
-
- /* copy chunk->data to profile */
- for (; i<size; i++)
- *p++ = *s++;
-
(void) SetImageProfile(image,"exif",profile,exception);
-
profile=DestroyStringInfo(profile);
-
return(1);
}
@@ -1969,12 +1943,51 @@
#if PNG_LIBPNG_VER > 10631
if (png_get_eXIf_1(ping,info,&size,&data))
- (void) PNGSetExifProfile(image,size,data,exception);
+ (void) PNGSetExifProfile(image,data,size,exception);
#endif
}
#endif
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
+static int PNGParseiTXt(Image *image,png_byte *data,png_size_t size,
+ ExceptionInfo *exception)
+{
+ if ((size > 19) && (LocaleNCompare((const char *) data,
+ "XML:com.adobe.xmp",17) == 0) && (data[18] == 0) && (data[19] == 0))
+ {
+ size_t
+ offset;
+
+ StringInfo
+ *profile;
+
+ offset=20;
+ while(offset < size)
+ {
+ if (data[offset++] == 0)
+ break;
+ }
+ while(offset < size)
+ {
+ if (data[offset++] == 0)
+ break;
+ }
+ if (size-offset < 1)
+ return(0);
+ profile=BlobToStringInfo((const void *) (data+offset),size-offset);
+ if (profile == (StringInfo *) NULL)
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ image->filename);
+ return(-1);
+ }
+ (void) SetImageProfile(image,"xmp",profile,exception);
+ profile=DestroyStringInfo(profile);
+ return(1);
+ }
+ return(0);
+}
static int read_user_chunk_callback(png_struct *ping, png_unknown_chunkp chunk)
{
@@ -2001,33 +2014,24 @@
" read_user_chunk: found %c%c%c%c chunk",
chunk->name[0],chunk->name[1],chunk->name[2],chunk->name[3]);
- if (chunk->name[0] == 101 &&
- (chunk->name[1] == 88 || chunk->name[1] == 120 ) &&
- chunk->name[2] == 73 &&
- chunk-> name[3] == 102)
+ if ((chunk->name[0] == 101) &&
+ ((chunk->name[1] == 88) || (chunk->name[1] == 120)) &&
+ (chunk->name[2] == 73) && (chunk->name[3] == 102))
{
- /* process eXIf or exIf chunk */
-
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " recognized eXIf chunk");
-
image=(Image *) png_get_user_chunk_ptr(ping);
error_info=(PNGErrorInfo *) png_get_error_ptr(ping);
- return(PNGSetExifProfile(image,chunk->size,chunk->data,
+ return(PNGSetExifProfile(image,chunk->data,chunk->size,
error_info->exception));
}
/* orNT */
- if (chunk->name[0] == 111 &&
- chunk->name[1] == 114 &&
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/pnm.c
^
|
@@ -65,6 +65,7 @@
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
+#include "coders/coders-private.h"

/*
Typedef declarations.
@@ -278,6 +279,8 @@
*image;
MagickBooleanType
+ is_gray = MagickTrue,
+ is_mono = MagickTrue,
status;
QuantumAny
@@ -611,6 +614,12 @@
pixel=ScaleAnyToQuantum(PNMInteger(image,&comment_info,10,
exception),max_value);
SetPixelBlue(image,pixel,q);
+ if ((is_gray != MagickFalse) &&
+ (IsPixelGray(image,q) == MagickFalse))
+ is_gray=MagickFalse;
+ if ((is_mono != MagickFalse) &&
+ (IsPixelMonochrome(image,q) == MagickFalse))
+ is_mono=MagickFalse;
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
@@ -625,6 +634,10 @@
if (EOFBlob(image) != MagickFalse)
break;
}
+ if (is_gray != MagickFalse)
+ image->type=GrayscaleType;
+ if (is_mono != MagickFalse)
+ image->type=BilevelType;
break;
}
case '4':
@@ -747,7 +760,15 @@
}
default:
{
- if (image->depth <= 8)
+ switch (image->depth)
+ {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
{
unsigned char
pixel;
@@ -758,8 +779,15 @@
SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
q+=GetPixelChannels(image);
}
+ break;
}
- else if (image->depth <= 16)
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
{
unsigned short
pixel;
@@ -770,8 +798,9 @@
SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
q+=GetPixelChannels(image);
}
+ break;
}
- else
+ default:
{
unsigned int
pixel;
@@ -782,7 +811,9 @@
SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
q+=GetPixelChannels(image);
}
+ break;
}
+ }
break;
}
}
@@ -845,6 +876,36 @@
p=(unsigned char *) stream;
switch (image->depth)
{
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ {
+ unsigned char
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushCharPixel(p,&pixel);
+ SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushCharPixel(p,&pixel);
+ SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushCharPixel(p,&pixel);
+ SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if ((is_gray != MagickFalse) &&
+ (IsPixelGray(image,q) == MagickFalse))
+ is_gray=MagickFalse;
+ if ((is_mono != MagickFalse) &&
+ (IsPixelMonochrome(image,q) == MagickFalse))
+ is_mono=MagickFalse;
+ q+=GetPixelChannels(image);
+ }
+ break;
+ }
case 8:
{
for (x=0; x < (ssize_t) image->columns; x++)
@@ -853,6 +914,42 @@
SetPixelGreen(image,ScaleCharToQuantum(*p++),q);
SetPixelBlue(image,ScaleCharToQuantum(*p++),q);
SetPixelAlpha(image,OpaqueAlpha,q);
+ if ((is_gray != MagickFalse) &&
+ (IsPixelGray(image,q) == MagickFalse))
+ is_gray=MagickFalse;
+ if ((is_mono != MagickFalse) &&
+ (IsPixelMonochrome(image,q) == MagickFalse))
+ is_mono=MagickFalse;
+ q+=GetPixelChannels(image);
+ }
+ break;
+ }
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ {
+ unsigned short
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if ((is_gray != MagickFalse) &&
+ (IsPixelGray(image,q) == MagickFalse))
+ is_gray=MagickFalse;
+ if ((is_mono != MagickFalse) &&
+ (IsPixelMonochrome(image,q) == MagickFalse))
+ is_mono=MagickFalse;
q+=GetPixelChannels(image);
}
break;
@@ -871,6 +968,12 @@
p=PushShortPixel(MSBEndian,p,&pixel);
SetPixelBlue(image,ScaleShortToQuantum(pixel),q);
SetPixelAlpha(image,OpaqueAlpha,q);
+ if ((is_gray != MagickFalse) &&
+ (IsPixelGray(image,q) == MagickFalse))
+ is_gray=MagickFalse;
+ if ((is_mono != MagickFalse) &&
+ (IsPixelMonochrome(image,q) == MagickFalse))
+ is_mono=MagickFalse;
q+=GetPixelChannels(image);
}
break;
@@ -889,63 +992,38 @@
p=PushLongPixel(MSBEndian,p,&pixel);
SetPixelBlue(image,ScaleLongToQuantum(pixel),q);
SetPixelAlpha(image,OpaqueAlpha,q);
+ if ((is_gray != MagickFalse) &&
+ (IsPixelGray(image,q) == MagickFalse))
+ is_gray=MagickFalse;
+ if ((is_mono != MagickFalse) &&
+ (IsPixelMonochrome(image,q) == MagickFalse))
+ is_mono=MagickFalse;
q+=GetPixelChannels(image);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/ps.c
^
|
@@ -79,6 +79,7 @@
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
#include "coders/bytebuffer-private.h"
+#include "coders/coders-private.h"
#include "coders/ghostscript-private.h"

/*
@@ -341,7 +342,8 @@
i=0;
for (c=ReadMagickByteBuffer(&buffer); c != EOF; c=ReadMagickByteBuffer(&buffer))
{
- if ((c == '\r') || (c == '\n') || ((i+1) == sizeof(version)))
+ if ((c == '\r') || (c == '\n') ||
+ ((i+1) == (ssize_t) sizeof(version)))
break;
version[i++]=(char) c;
}
@@ -579,6 +581,7 @@
file;
MagickBooleanType
+ crop,
fitPage,
status;
@@ -679,7 +682,7 @@
}
fitPage=MagickFalse;
option=GetImageOption(image_info,"eps:fit-page");
- if (option != (char *) NULL)
+ if (option != (const char *) NULL)
{
char
*page_geometry;
@@ -702,6 +705,14 @@
page_geometry=DestroyString(page_geometry);
fitPage=MagickTrue;
}
+ crop=MagickFalse;
+ if (*image_info->magick == 'E')
+ {
+ option=GetImageOption(image_info,"eps:use-cropbox");
+ if ((option == (const char *) NULL) ||
+ (IsStringTrue(option) != MagickFalse))
+ crop=MagickTrue;
+ }
if (IssRGBCompatibleColorspace(image_info->colorspace) != MagickFalse)
info.cmyk=MagickFalse;
/*
@@ -753,11 +764,14 @@
options=AcquireString("");
(void) FormatLocaleString(density,MagickPathExtent,"%gx%g",resolution.x,
resolution.y);
- if (image_info->ping != MagickFalse)
- (void) FormatLocaleString(density,MagickPathExtent,"2.0x2.0");
- else
- (void) FormatLocaleString(options,MagickPathExtent,"-g%.20gx%.20g ",(double)
- page.width,(double) page.height);
+ if (crop == MagickFalse)
+ {
+ if (image_info->ping != MagickFalse)
+ (void) FormatLocaleString(density,MagickPathExtent,"2.0x2.0");
+ else
+ (void) FormatLocaleString(options,MagickPathExtent,"-g%.20gx%.20g ",
+ (double) page.width,(double) page.height);
+ }
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
if (read_info->number_scenes != 0)
@@ -775,9 +789,7 @@
}
if (*image_info->magick == 'E')
{
- option=GetImageOption(image_info,"eps:use-cropbox");
- if ((option == (const char *) NULL) ||
- (IsStringTrue(option) != MagickFalse))
+ if (crop != MagickFalse)
(void) ConcatenateMagickString(options,"-dEPSCrop ",MagickPathExtent);
if (fitPage != MagickFalse)
(void) ConcatenateMagickString(options,"-dEPSFitPage ",
@@ -1457,10 +1469,14 @@
imageListLength=GetImageListLength(image);
do
{
+ ImageType
+ type = UndefinedType;
+
/*
Scale relative to dots-per-inch.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
delta.x=DefaultResolution;
delta.y=DefaultResolution;
resolution.x=image->resolution.x;
@@ -1738,8 +1754,9 @@
/*
Output image data.
*/
- (void) FormatLocaleString(buffer,MagickPathExtent,"%.20g %.20g\n%g %g\n%g\n",
- (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
+ (void) FormatLocaleString(buffer,MagickPathExtent,
+ "%.20g %.20g\n%g %g\n%g\n",(double) geometry.x,(double) geometry.y,
+ scale.x,scale.y,pointsize);
(void) WriteBlobString(image,buffer);
labels=(char **) NULL;
value=GetImageProperty(image,"label",exception);
@@ -1760,10 +1777,11 @@
pixel.alpha=(MagickRealType) TransparentAlpha;
index=(Quantum) 0;
x=0;
- if ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse))
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
{
- if (SetImageMonochrome(image,exception) == MagickFalse)
+ if (type == GrayscaleType)
{
Quantum
pixel;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/ps2.c
^
|
@@ -46,6 +46,7 @@
#include "MagickCore/cache.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/compress.h"
#include "MagickCore/constitute.h"
#include "MagickCore/draw.h"
@@ -70,6 +71,7 @@
#include "MagickCore/string_.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/utility.h"
+#include "coders/coders-private.h"

/*
Define declarations.
@@ -486,6 +488,9 @@
imageListLength=GetImageListLength(image);
do
{
+ ImageType
+ type;
+
/*
Scale relative to dots-per-inch.
*/
@@ -723,9 +728,11 @@
number_pixels=(MagickSizeType) image->columns*image->rows;
if (number_pixels != (MagickSizeType) ((size_t) number_pixels))
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
if ((compression == FaxCompression) || (compression == Group4Compression) ||
- ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse)))
+ (IsGrayImageType(type) != MagickFalse))
{
(void) FormatLocaleString(buffer,MagickPathExtent,
"%.20g %.20g\n1\n%d\n",(double) image->columns,(double) image->rows,
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/ps3.c
^
|
@@ -49,6 +49,7 @@
#include "MagickCore/channel.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/compress.h"
#include "MagickCore/constitute.h"
#include "MagickCore/draw.h"
@@ -74,6 +75,7 @@
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
+#include "coders/coders-private.h"

/*
Define declarations.
@@ -933,6 +935,9 @@
imageListLength=GetImageListLength(image);
do
{
+ ImageType
+ type;
+
/*
Scale relative to dots-per-inch.
*/
@@ -998,6 +1003,7 @@
if (value != (const char *) NULL)
text_size=(size_t) (MultilineCensus(value)*pointsize+12);
page++;
+ type=IdentifyImageCoderType(image,exception);
if (page == 1)
{
/*
@@ -1044,7 +1050,7 @@
(void) WriteBlobString(image,
"%%DocumentProcessColors: Cyan Magenta Yellow Black\n");
else
- if (SetImageGray(image,exception) != MagickFalse)
+ if (IsGrayImageType(type) != MagickFalse)
(void) WriteBlobString(image,
"%%DocumentProcessColors: Black\n");
}
@@ -1122,7 +1128,7 @@
(void) WriteBlobString(image,
"%%PageProcessColors: Cyan Magenta Yellow Black\n");
else
- if (SetImageGray(image,exception) != MagickFalse)
+ if (IsGrayImageType(type) != MagickFalse)
(void) WriteBlobString(image,"%%PageProcessColors: Black\n");
/*
Adjust document bounding box to bound page bounding box.
@@ -1263,8 +1269,7 @@
(image_info->type != ColorSeparationType) &&
(image_info->type != ColorSeparationAlphaType) &&
(image->colorspace != CMYKColorspace) &&
- ((SetImageGray(image,exception) != MagickFalse) ||
- (SetImageMonochrome(image,exception) != MagickFalse)))
+ (IsGrayImageType(type) != MagickFalse))
{
/*
Gray images.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/psd.c
^
|
@@ -78,6 +78,7 @@
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
+#include "coders/coders-private.h"
#ifdef MAGICKCORE_ZLIB_DELEGATE
#include <zlib.h>
#endif
@@ -2215,15 +2216,11 @@
ModuleExport MagickBooleanType ReadPSDLayers(Image *image,
const ImageInfo *image_info,const PSDInfo *psd_info,ExceptionInfo *exception)
{
- PolicyDomain
- domain;
-
- PolicyRights
- rights;
+ MagickBooleanType
+ status;
- domain=CoderPolicyDomain;
- rights=ReadPolicyRights;
- if (IsRightsAuthorized(domain,rights,"PSD") == MagickFalse)
+ status=IsRightsAuthorized(CoderPolicyDomain,ReadPolicyRights,"PSD");
+ if (status == MagickFalse)
return(MagickTrue);
return(ReadPSDLayersInternal(image,image_info,psd_info,MagickFalse,
exception));
@@ -3743,22 +3740,17 @@
(void) DeleteImageRegistry(property);
next_image=GetNextImageInList(next_image);
}
-
return(status);
}
ModuleExport MagickBooleanType WritePSDLayers(Image * image,
const ImageInfo *image_info,const PSDInfo *psd_info,ExceptionInfo *exception)
{
- PolicyDomain
- domain;
-
- PolicyRights
- rights;
+ MagickBooleanType
+ status;
- domain=CoderPolicyDomain;
- rights=WritePolicyRights;
- if (IsRightsAuthorized(domain,rights,"PSD") == MagickFalse)
+ status=IsRightsAuthorized(CoderPolicyDomain,WritePolicyRights,"PSD");
+ if (status == MagickFalse)
return(MagickTrue);
return WritePSDLayersInternal(image,image_info,psd_info,(size_t*) NULL,
exception);
@@ -3770,6 +3762,9 @@
const StringInfo
*icc_profile;
+ ImageType
+ type;
+
MagickBooleanType
status;
@@ -3781,8 +3776,7 @@
size_t
length,
- num_channels,
- packet_size;
+ num_channels;
StringInfo
*bim_profile;
@@ -3801,9 +3795,6 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- packet_size=(size_t) (image->depth > 8 ? 6 : 3);
- if (image->alpha_trait != UndefinedPixelTrait)
- packet_size+=image->depth > 8 ? 2 : 1;
psd_info.version=1;
if ((LocaleCompare(image_info->magick,"PSB") == 0) ||
(image->columns > 30000) || (image->rows > 30000))
@@ -3813,12 +3804,15 @@
for (i=1; i <= 6; i++)
(void) WriteBlobByte(image, 0); /* 6 bytes of reserved */
/* When the image has a color profile it won't be converted to gray scale */
+ type=IdentifyImageCoderType(image,exception);
+ (void) type;
if ((GetImageProfile(image,"icc") == (StringInfo *) NULL) &&
(SetImageGray(image,exception) != MagickFalse))
num_channels=(image->alpha_trait != UndefinedPixelTrait ? 2UL : 1UL);
else
- if ((image_info->type != TrueColorType) && (image_info->type !=
- TrueColorAlphaType) && (image->storage_class == PseudoClass))
+ if ((image_info->type != TrueColorType) &&
+ (image_info->type != TrueColorAlphaType) &&
+ (image->storage_class == PseudoClass))
num_channels=(image->alpha_trait != UndefinedPixelTrait ? 2UL : 1UL);
else
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/rgb.c
^
|
@@ -1372,7 +1372,8 @@
/*
Convert MIFF to RGB raster pixels.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((LocaleCompare(image_info->magick,"RGBA") == 0) &&
(image->alpha_trait == UndefinedPixelTrait))
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/rgf.c
^
|
@@ -340,8 +340,9 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,sRGBColorspace,exception);
- if((image->columns > 255L) || (image->rows > 255L))
+ if ((image->columns > 255L) || (image->rows > 255L))
ThrowWriterException(ImageError,"Dimensions must be less than 255x255");
/*
Write header (just the image dimensions)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/sgi.c
^
|
@@ -56,6 +56,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/pixel-accessor.h"
@@ -63,7 +64,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"

/*
Typedef declaractions.
@@ -967,7 +968,8 @@
*/
if ((image->columns > 65535UL) || (image->rows > 65535UL))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) memset(&iris_info,0,sizeof(iris_info));
iris_info.magic=0x01DA;
compression=image->compression;
@@ -987,8 +989,13 @@
iris_info.depth=4;
else
{
- if ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse))
+ ImageType
+ type;
+
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
{
iris_info.dimension=2;
iris_info.depth=1;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/sixel.c
^
|
@@ -48,6 +48,7 @@
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
+#include "MagickCore/colormap-private.h"
#include "MagickCore/colorspace.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/exception.h"
@@ -93,51 +94,54 @@
Structure declarations.
*/
typedef struct sixel_node {
- struct sixel_node *next;
- int color;
- int left;
- int right;
- sixel_pixel_t *map;
+ int
+ color,
+ left,
+ right;
+
+ sixel_pixel_t
+ *map;
+
+ struct sixel_node
+ *next;
} sixel_node_t;
typedef struct sixel_output {
+ Image
+ *image;
- /* compatiblity flags */
-
- /* 0: 7bit terminal,
- * 1: 8bit terminal */
- unsigned char has_8bit_control;
-
- int save_pixel;
- int save_count;
- int active_palette;
-
- sixel_node_t *node_top;
- sixel_node_t *node_free;
-
- Image *image;
- int pos;
- unsigned char buffer[1];
+ int
+ active_palette,
+ pos,
+ save_count,
+ save_pixel;
+
+ sixel_node_t
+ *node_free,
+ *node_top;
+ unsigned char
+ buffer[SIXEL_OUTPUT_PACKET_SIZE*2],
+ has_8bit_control; /* 0: 7bit terminal, 1: 8bit terminal */
} sixel_output_t;
static int const sixel_default_color_table[] = {
- SIXEL_XRGB(0, 0, 0), /* 0 Black */
- SIXEL_XRGB(20, 20, 80), /* 1 Blue */
- SIXEL_XRGB(80, 13, 13), /* 2 Red */
- SIXEL_XRGB(20, 80, 20), /* 3 Green */
- SIXEL_XRGB(80, 20, 80), /* 4 Magenta */
- SIXEL_XRGB(20, 80, 80), /* 5 Cyan */
- SIXEL_XRGB(80, 80, 20), /* 6 Yellow */
- SIXEL_XRGB(53, 53, 53), /* 7 Gray 50% */
- SIXEL_XRGB(26, 26, 26), /* 8 Gray 25% */
- SIXEL_XRGB(33, 33, 60), /* 9 Blue* */
- SIXEL_XRGB(60, 26, 26), /* 10 Red* */
- SIXEL_XRGB(33, 60, 33), /* 11 Green* */
- SIXEL_XRGB(60, 33, 60), /* 12 Magenta* */
- SIXEL_XRGB(33, 60, 60), /* 13 Cyan* */
- SIXEL_XRGB(60, 60, 33), /* 14 Yellow* */
- SIXEL_XRGB(80, 80, 80), /* 15 Gray 75% */
+ SIXEL_XRGB(0, 0, 0), /* 0 Black */
+ SIXEL_XRGB(20, 20, 80), /* 1 Blue */
+ SIXEL_XRGB(80, 13, 13), /* 2 Red */
+ SIXEL_XRGB(20, 80, 20), /* 3 Green */
+ SIXEL_XRGB(80, 20, 80), /* 4 Magenta */
+ SIXEL_XRGB(20, 80, 80), /* 5 Cyan */
+ SIXEL_XRGB(80, 80, 20), /* 6 Yellow */
+ SIXEL_XRGB(53, 53, 53), /* 7 Gray 50% */
+ SIXEL_XRGB(26, 26, 26), /* 8 Gray 25% */
+ SIXEL_XRGB(33, 33, 60), /* 9 Blue* */
+ SIXEL_XRGB(60, 26, 26), /* 10 Red* */
+ SIXEL_XRGB(33, 60, 33), /* 11 Green* */
+ SIXEL_XRGB(60, 33, 60), /* 12 Magenta* */
+ SIXEL_XRGB(33, 60, 60), /* 13 Cyan* */
+ SIXEL_XRGB(60, 60, 33), /* 14 Yellow* */
+ SIXEL_XRGB(80, 80, 80), /* 15 Gray 75% */
};
/*
@@ -146,765 +150,802 @@
static MagickBooleanType
WriteSIXELImage(const ImageInfo *,Image *,ExceptionInfo *);

-static int hue_to_rgb(int n1, int n2, int hue)
+static int hue_to_rgb(int n1,int n2,int hue)
{
- const int HLSMAX = 100;
+ const int
+ HLSMAX=100;
- if (hue < 0) {
- hue += HLSMAX;
- }
-
- if (hue > HLSMAX) {
- hue -= HLSMAX;
- }
-
- if (hue < (HLSMAX / 6)) {
- return (n1 + (((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);
+ if (hue < 0)
+ hue += HLSMAX;
+ if (hue > HLSMAX)
+ hue -= HLSMAX;
+ if (hue < (HLSMAX/6))
+ return(n1 + (((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);
}
static int hls_to_rgb(int hue, int lum, int sat)
{
- int R, G, B;
- int Magic1, Magic2;
- const int RGBMAX = 255;
- const int HLSMAX = 100;
-
- if (sat == 0) {
- R = G = B = (lum * RGBMAX) / HLSMAX;
- } else {
- if (lum <= (HLSMAX / 2)) {
- Magic2 = (int) (((ssize_t) lum * (HLSMAX + sat) + (HLSMAX / 2)) / HLSMAX);
- } else {
- Magic2 = (int) (lum + sat - (((ssize_t) lum * sat) + (HLSMAX / 2)) / HLSMAX);
- }
- Magic1 = 2 * lum - Magic2;
+ const int
+ HLSMAX = 100,
+ RGBMAX = 255;
+
+ int
+ b,
+ g,
+ magic1,
+ magic2,
+ r;
- R = (hue_to_rgb(Magic1, Magic2, hue + (HLSMAX / 3)) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
- G = (hue_to_rgb(Magic1, Magic2, hue) * RGBMAX + (HLSMAX / 2)) / HLSMAX;
- B = (hue_to_rgb(Magic1, Magic2, hue - (HLSMAX / 3)) * RGBMAX + (HLSMAX/2)) / HLSMAX;
+ if (sat == 0)
+ r=g=b=(lum*RGBMAX)/HLSMAX;
+ else
+ {
+ if (lum <= (HLSMAX / 2))
+ magic2=(int) (((ssize_t) lum*((ssize_t) HLSMAX+sat)+(HLSMAX/2))/HLSMAX);
+ else
+ magic2=(int) (lum+sat-(((ssize_t) lum*sat)+(HLSMAX/2))/HLSMAX);
+ magic1=2*lum-magic2;
+ r=(hue_to_rgb(magic1,magic2,hue+(HLSMAX/3))*RGBMAX+(HLSMAX/2))/HLSMAX;
+ g=(hue_to_rgb(magic1,magic2,hue)*RGBMAX+(HLSMAX/2))/HLSMAX;
+ b=(hue_to_rgb(magic1,magic2,hue-(HLSMAX/3))*RGBMAX+(HLSMAX/2))/HLSMAX;
}
- return SIXEL_RGB(R, G, B);
+ return(SIXEL_RGB(r,g,b));
}
static unsigned char *get_params(unsigned char *p, int *param, int *len)
{
- int n;
+ int
+ n;
- *len = 0;
- while (*p != '\0') {
- while (*p == ' ' || *p == '\t') {
- p++;
+ *len=0;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/sun.c
^
|
@@ -824,7 +824,8 @@
/*
Initialize SUN raster file header.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
sun_info.magic=0x59a66a95;
if ((image->columns != (unsigned int) image->columns) ||
(image->rows != (unsigned int) image->rows))
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/svg.c
^
|
@@ -67,6 +67,7 @@
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/policy.h"
#include "MagickCore/property.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/resource_.h"
@@ -75,6 +76,7 @@
#include "MagickCore/string-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
+#include "coders/coders-private.h"
#if defined(MAGICKCORE_XML_DELEGATE)
# if defined(MAGICKCORE_WINDOWS_SUPPORT)
@@ -405,10 +407,6 @@
PixelInfo
fill_color;
- ssize_t
- x,
- n;
-
Quantum
*q;
@@ -416,6 +414,8 @@
*svg_handle;
ssize_t
+ n,
+ x,
y;
unsigned char
@@ -470,16 +470,16 @@
rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x*256,
image->resolution.y*256);
rsvg_handle_get_dimensions(svg_handle,&dpi_dimension_info);
- if ((fabs(dpi_dimension_info.width-dimension_info.width) >= MagickEpsilon) ||
- (fabs(dpi_dimension_info.height-dimension_info.height) >= MagickEpsilon))
+ if ((fabs((double) dpi_dimension_info.width-dimension_info.width) >= MagickEpsilon) ||
+ (fabs((double) dpi_dimension_info.height-dimension_info.height) >= MagickEpsilon))
apply_density=MagickFalse;
rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x,
image->resolution.y);
}
if (image_info->size != (char *) NULL)
{
- (void) GetGeometry(image_info->size,(ssize_t *) NULL,
- (ssize_t *) NULL,&image->columns,&image->rows);
+ (void) GetGeometry(image_info->size,(ssize_t *) NULL,(ssize_t *) NULL,
+ &image->columns,&image->rows);
if ((image->columns != 0) || (image->rows != 0))
{
image->resolution.x=DefaultSVGDensity*image->columns/
@@ -3373,6 +3373,7 @@
reason,"`%s`",message);
message=DestroyString(message);
va_end(operands);
+ xmlStopParser(svg_info->parser);
}
static void SVGCDataBlock(void *context,const xmlChar *value,int length)
@@ -3474,7 +3475,8 @@
}
#endif
-static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
+static Image *RenderMSVGImage(const ImageInfo *image_info,Image *image,
+ ExceptionInfo *exception)
{
char
filename[MagickPathExtent];
@@ -3486,7 +3488,6 @@
*file;
Image
- *image,
*next;
int
@@ -3509,61 +3510,6 @@
sax_handler;
/*
- Open image file.
- */
- assert(image_info != (const ImageInfo *) NULL);
- assert(image_info->signature == MagickCoreSignature);
- assert(exception != (ExceptionInfo *) NULL);
- if (image_info->debug != MagickFalse)
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
- image_info->filename);
- assert(exception->signature == MagickCoreSignature);
- image=AcquireImage(image_info,exception);
- status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
- if (status == MagickFalse)
- {
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
- if ((fabs(image->resolution.x) < MagickEpsilon) ||
- (fabs(image->resolution.y) < MagickEpsilon))
- {
- GeometryInfo
- geometry_info;
-
- int
- flags;
-
- flags=ParseGeometry(SVGDensityGeometry,&geometry_info);
- image->resolution.x=geometry_info.rho;
- image->resolution.y=geometry_info.sigma;
- if ((flags & SigmaValue) == 0)
- image->resolution.y=image->resolution.x;
- }
- if (LocaleCompare(image_info->magick,"MSVG") != 0)
- {
- Image
- *svg_image;
-
-#if defined(MAGICKCORE_RSVG_DELEGATE)
- if (LocaleCompare(image_info->magick,"RSVG") == 0)
- {
- svg_image=RenderRSVGImage(image_info,image,exception);
- return(svg_image);
- }
-#endif
- svg_image=RenderSVGImage(image_info,image,exception);
- if (svg_image != (Image *) NULL)
- {
- image=DestroyImageList(image);
- return(svg_image);
- }
-#if defined(MAGICKCORE_RSVG_DELEGATE)
- svg_image=RenderRSVGImage(image_info,image,exception);
- return(svg_image);
-#endif
- }
- /*
Open draw file.
*/
file=(FILE *) NULL;
@@ -3716,15 +3662,27 @@
return(GetFirstImageInList(image));
}
#else
+static Image *RenderMSVGImage(const ImageInfo *magick_unused(image_info),
+ Image *image,ExceptionInfo *magick_unused(exception))
+{
+ magick_unreferenced(image_info);
+ magick_unreferenced(exception);
+ image=DestroyImageList(image);
+ return((Image *) NULL);
+}
+#endif
+
static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
- *image,
- *svg_image;
+ *image;
MagickBooleanType
status;
+ /*
+ Open image file.
+ */
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(exception != (ExceptionInfo *) NULL);
@@ -3754,11 +3712,36 @@
if ((flags & SigmaValue) == 0)
image->resolution.y=image->resolution.x;
}
- svg_image=RenderSVGImage(image_info,image,exception);
- image=DestroyImage(image);
- return(svg_image);
-}
+ if (LocaleCompare(image_info->magick,"MSVG") != 0)
+ {
+ Image
+ *svg_image;
+
+#if defined(MAGICKCORE_RSVG_DELEGATE)
+ if (LocaleCompare(image_info->magick,"RSVG") == 0)
+ {
+ image=RenderRSVGImage(image_info,image,exception);
+ return(image);
+ }
+#endif
+ svg_image=RenderSVGImage(image_info,image,exception);
+ if (svg_image != (Image *) NULL)
+ {
+ image=DestroyImageList(image);
+ return(svg_image);
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/tga.c
^
|
@@ -57,6 +57,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
@@ -65,7 +66,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"
/*
Enumerated declaractions.
@@ -257,10 +258,7 @@
image->storage_class=PseudoClass;
if ((tga_info.image_type == TGAMonochrome) ||
(tga_info.image_type == TGARLEMonochrome))
- {
- image->type=GrayscaleType;
- image->colorspace=GRAYColorspace;
- }
+ (void) SetImageColorspace(image,GRAYColorspace,exception);
image->compression=NoCompression;
if ((tga_info.image_type == TGARLEColormap) ||
(tga_info.image_type == TGARLEMonochrome) ||
@@ -728,24 +726,24 @@
const double
midpoint = QuantumRange/2.0;
+ const Quantum
+ *p;
+
+ ImageType
+ type;
+
MagickBooleanType
status;
QuantumAny
range;
- const Quantum
- *p;
-
ssize_t
x;
ssize_t
i;
- unsigned char
- *q;
-
size_t
channels;
@@ -758,6 +756,9 @@
TGAInfo
tga_info;
+ unsigned char
+ *q;
+
/*
Open output image file.
*/
@@ -777,7 +778,8 @@
*/
if ((image->columns > 65535L) || (image->rows > 65535L))
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
@@ -796,11 +798,14 @@
tga_info.height=(unsigned short) image->rows;
tga_info.bits_per_pixel=8;
tga_info.attributes=0;
+ type=UndefinedType;
+ if (image_info->type != TrueColorType)
+ type=IdentifyImageCoderType(image,exception);
if ((image_info->type != TrueColorType) &&
(image_info->type != TrueColorAlphaType) &&
(image_info->type != PaletteType) &&
(image->alpha_trait == UndefinedPixelTrait) &&
- (SetImageGray(image,exception) != MagickFalse))
+ (IsGrayImageType(type) != MagickFalse))
tga_info.image_type=compression == RLECompression ? TGARLEMonochrome :
TGAMonochrome;
else
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/tiff.c
^
|
@@ -87,7 +87,8 @@
#include "MagickCore/thread_.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
-#include "psd-private.h"
+#include "coders/coders-private.h"
+#include "coders/psd-private.h"
#if defined(MAGICKCORE_TIFF_DELEGATE)
# if defined(MAGICKCORE_HAVE_TIFFCONF_H)
# include <tiffconf.h>
@@ -681,7 +682,7 @@
{
char
message[MagickPathExtent],
- *text;
+ *text = (char *) NULL;
MagickBooleanType
status;
@@ -690,7 +691,6 @@
count,
type;
- text=(char *) NULL;
status=MagickTrue;
if ((TIFFGetField(tiff,TIFFTAG_ARTIST,&text) == 1) &&
(text != (char *) NULL))
@@ -992,10 +992,11 @@
#if defined(TIFF_VERSION_BIG)
uint64
+ *value = (uint64 *) NULL;
#else
uint32
+ *value = (uint32 *) NULL;
#endif
- *value;
unsigned char
buffer[BUFFER_SIZE+32];
@@ -1012,7 +1013,6 @@
/*
Search for Adobe APP14 JPEG marker.
*/
- value=NULL;
if (!TIFFGetField(tiff,TIFFTAG_STRIPOFFSETS,&value) || (value == NULL))
return(ReadStripMethod);
position=TellBlob(image);
@@ -1207,7 +1207,7 @@
*option;
float
- *chromaticity,
+ *chromaticity = (float *) NULL,
x_position,
y_position,
x_resolution,
@@ -1473,15 +1473,15 @@
#endif
if ((photometric == PHOTOMETRIC_MINISBLACK) ||
(photometric == PHOTOMETRIC_MINISWHITE))
- image->colorspace=GRAYColorspace;
+ (void) SetImageColorspace(image,GRAYColorspace,exception);
if (photometric == PHOTOMETRIC_SEPARATED)
- image->colorspace=CMYKColorspace;
+ (void) SetImageColorspace(image,CMYKColorspace,exception);
if (photometric == PHOTOMETRIC_CIELAB)
- image->colorspace=LabColorspace;
+ (void) SetImageColorspace(image,LabColorspace,exception);
if ((photometric == PHOTOMETRIC_YCBCR) &&
(compress_tag != COMPRESSION_OJPEG) &&
(compress_tag != COMPRESSION_JPEG))
- image->colorspace=YCbCrColorspace;
+ (void) SetImageColorspace(image,YCbCrColorspace,exception);
status=TIFFGetProfiles(tiff,image,exception);
if (status == MagickFalse)
{
@@ -1621,9 +1621,9 @@
range;
uint16
- *blue_colormap,
- *green_colormap,
- *red_colormap;
+ *blue_colormap = (uint16 *) NULL,
+ *green_colormap = (uint16 *) NULL,
+ *red_colormap = (uint16 *) NULL;
/*
Initialize colormap.
@@ -2000,12 +2000,7 @@
number_pixels=(MagickSizeType) columns*rows;
if (HeapOverflowSanityCheck(rows,sizeof(*tile_pixels)) != MagickFalse)
ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
- extent=TIFFTileSize(tiff);
-#if defined(TIFF_VERSION_BIG)
- extent+=columns*sizeof(uint64);
-#else
- extent+=columns*sizeof(uint32);
-#endif
+ extent=MagickMax(rows*TIFFTileRowSize(tiff),TIFFTileSize(tiff));
tile_pixels=(unsigned char *) AcquireQuantumMemory(extent,
sizeof(*tile_pixels));
if (tile_pixels == (unsigned char *) NULL)
@@ -2048,7 +2043,7 @@
columns_remaining=image->columns-x;
if ((ssize_t) (x+columns) < (ssize_t) image->columns)
columns_remaining=columns;
- if (TIFFReadTile(tiff,tile_pixels,(uint32) x,(uint32) y,0,i) == 0)
+ if (TIFFReadTile(tiff,tile_pixels,(uint32) x,(uint32) y,0,i) == -1)
break;
p=tile_pixels;
for (row=0; row < rows_remaining; row++)
@@ -2108,8 +2103,13 @@
if (generic_info == (MemoryInfo *) NULL)
ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
pixels=(uint32 *) GetVirtualMemoryBlob(generic_info);
- (void) TIFFReadRGBAImage(tiff,(uint32) image->columns,(uint32)
+ status=TIFFReadRGBAImage(tiff,(uint32) image->columns,(uint32)
image->rows,(uint32 *) pixels,0);
+ if (status == -1)
+ {
+ generic_info=RelinquishVirtualMemory(generic_info);
+ break;
+ }
p=pixels+(image->columns*image->rows)-1;
for (y=0; y < (ssize_t) image->rows; y++)
{
@@ -3595,9 +3595,9 @@
ImageType
type;
- type=IdentifyImageType(image,exception);
+ type=IdentifyImageCoderType(image,exception);
if ((image_info->type != PaletteType) &&
- ((type == GrayscaleType) || (type == BilevelType)))
+ (IsGrayImageType(type) != MagickFalse))
{
photometric=(uint16) (quantum_info->min_is_white !=
MagickFalse ? PHOTOMETRIC_MINISWHITE :
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/uil.c
^
|
@@ -212,7 +212,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
transparent=MagickFalse;
i=0;
p=(const Quantum *) NULL;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/vicar.c
^
|
@@ -468,7 +468,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Write header.
*/
@@ -476,8 +477,8 @@
(void) FormatLocaleString(header,MagickPathExtent,
"LBLSIZE=%.20g FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
"RECSIZE=%.20g ORG='BSQ' NL=%.20g NS=%.20g NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
- "NLB=0 TASK='ImageMagick'",(double) MagickPathExtent,(double) image->columns,
- (double) image->rows,(double) image->columns);
+ "NLB=0 TASK='ImageMagick'",(double) MagickPathExtent,(double)
+ image->columns,(double) image->rows,(double) image->columns);
(void) WriteBlob(image,MagickPathExtent,(unsigned char *) header);
/*
Write VICAR pixels.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/viff.c
^
|
@@ -57,6 +57,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/pixel-accessor.h"
@@ -64,7 +65,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"

/*
Forward declarations.
@@ -993,6 +994,9 @@
imageListLength=GetImageListLength(image);
do
{
+ ImageType
+ type;
+
/*
Initialize VIFF image structure.
*/
@@ -1026,6 +1030,7 @@
viff_info.map_enable=1; /* no colormap */
viff_info.maps_per_cycle=0;
number_pixels=(MagickSizeType) image->columns*image->rows;
+ type=IdentifyImageCoderType(image,exception);
if (image->storage_class == DirectClass)
{
/*
@@ -1042,7 +1047,7 @@
viff_info.color_space_model=VFF_CM_NONE;
viff_info.data_storage_type=VFF_TYP_1_BYTE;
packets=number_pixels;
- if (SetImageGray(image,exception) == MagickFalse)
+ if ((type != GrayscaleType) && (type != BilevelType))
{
/*
Colormapped VIFF raster.
@@ -1143,7 +1148,7 @@
}
}
else
- if (SetImageGray(image,exception) == MagickFalse)
+ if ((type != GrayscaleType) && (type != BilevelType))
{
unsigned char
*viff_colormap;
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/vips.c
^
|
@@ -53,6 +53,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/pixel-accessor.h"
@@ -60,7 +61,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "coders/coders-private.h"
/*
Define declaractions.
@@ -322,7 +323,7 @@
{
q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
- return MagickFalse;
+ return(MagickFalse);
for (x=0; x < (ssize_t) image->columns; x++)
{
pixel=ReadVIPSPixelNONE(image,format,type);
@@ -345,16 +346,17 @@
else
SetPixelAlpha(image,ReadVIPSPixelNONE(image,format,type),q);
}
- else if (channels == 5)
- {
- SetPixelIndex(image,ReadVIPSPixelNONE(image,format,type),q);
- SetPixelAlpha(image,ReadVIPSPixelNONE(image,format,type),q);
- }
+ else
+ if (channels == 5)
+ {
+ SetPixelIndex(image,ReadVIPSPixelNONE(image,format,type),q);
+ SetPixelAlpha(image,ReadVIPSPixelNONE(image,format,type),q);
+ }
}
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
- return MagickFalse;
+ return(MagickFalse);
}
return(MagickTrue);
}
@@ -395,7 +397,6 @@
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickCoreSignature);
-
image=AcquireImage(image_info,exception);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
@@ -406,10 +407,11 @@
marker=ReadBlobLSBLong(image);
if (marker == VIPS_MAGIC_LSB)
image->endian=LSBEndian;
- else if (marker == VIPS_MAGIC_MSB)
- image->endian=MSBEndian;
else
- ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+ if (marker == VIPS_MAGIC_MSB)
+ image->endian=MSBEndian;
+ else
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
image->columns=(size_t) ReadBlobLong(image);
image->rows=(size_t) ReadBlobLong(image);
status=SetImageExtent(image,image->columns,image->rows,exception);
@@ -512,7 +514,7 @@
(void) ConcatenateString(&metadata,buffer);
}
if (metadata != (char *) NULL)
- {
+ {
SetImageProperty(image,"vips:metadata",metadata,exception);
metadata=(char *) RelinquishMagickMemory(metadata);
}
@@ -607,7 +609,7 @@
%
*/
-static inline void WriteVIPSPixel(Image *image, const Quantum value)
+static inline void WriteVIPSPixel(Image *image,const Quantum value)
{
if (image->depth == 16)
(void) WriteBlobShort(image,ScaleQuantumToShort(value));
@@ -621,12 +623,15 @@
const char
*metadata;
- MagickBooleanType
- status;
-
const Quantum
*p;
+ ImageType
+ type;
+
+ MagickBooleanType
+ status;
+
ssize_t
x;
@@ -642,7 +647,6 @@
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
-
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
@@ -654,10 +658,15 @@
(void) WriteBlobLong(image,(unsigned int) image->rows);
(void) SetImageStorageClass(image,DirectClass,exception);
channels=image->alpha_trait != UndefinedPixelTrait ? 4 : 3;
- if (SetImageGray(image,exception) != MagickFalse)
- channels=image->alpha_trait != UndefinedPixelTrait ? 2 : 1;
- else if (image->colorspace == CMYKColorspace)
- channels=image->alpha_trait != UndefinedPixelTrait ? 5 : 4;
+ type=IdentifyImageCoderType(image,exception);
+ if (IsGrayImageType(type) != MagickFalse)
+ {
+ channels=image->alpha_trait != UndefinedPixelTrait ? 2 : 1;
+ (void) SetImageColorspace(image,GRAYColorspace,exception);
+ }
+ else
+ if (image->colorspace == CMYKColorspace)
+ channels=image->alpha_trait != UndefinedPixelTrait ? 5 : 4;
(void) WriteBlobLong(image,channels);
(void) WriteBlobLong(image,0);
if (image->depth == 16)
@@ -668,16 +677,16 @@
(void) WriteBlobLong(image,(unsigned int) VIPSBandFormatUCHAR);
}
(void) WriteBlobLong(image,VIPSCodingNONE);
- switch(image->colorspace)
+ switch (image->colorspace)
{
case CMYKColorspace:
(void) WriteBlobLong(image,VIPSTypeCMYK);
break;
case GRAYColorspace:
if (image->depth == 16)
- (void) WriteBlobLong(image, VIPSTypeGREY16);
+ (void) WriteBlobLong(image,VIPSTypeGREY16);
else
- (void) WriteBlobLong(image, VIPSTypeB_W);
+ (void) WriteBlobLong(image,VIPSTypeB_W);
break;
case LabColorspace:
(void) WriteBlobLong(image,VIPSTypeLAB);
@@ -687,36 +696,37 @@
break;
case RGBColorspace:
if (image->depth == 16)
- (void) WriteBlobLong(image, VIPSTypeRGB16);
+ (void) WriteBlobLong(image,VIPSTypeRGB16);
else
- (void) WriteBlobLong(image, VIPSTypeRGB);
+ (void) WriteBlobLong(image,VIPSTypeRGB);
break;
case XYZColorspace:
(void) WriteBlobLong(image,VIPSTypeXYZ);
break;
- default:
case sRGBColorspace:
+ default:
(void) SetImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobLong(image,VIPSTypesRGB);
break;
}
if (image->units == PixelsPerCentimeterResolution)
{
- (void) WriteBlobFloat(image,(image->resolution.x / 10));
- (void) WriteBlobFloat(image,(image->resolution.y / 10));
- }
- else if (image->units == PixelsPerInchResolution)
- {
- (void) WriteBlobFloat(image,(image->resolution.x / 25.4));
- (void) WriteBlobFloat(image,(image->resolution.y / 25.4));
+ (void) WriteBlobFloat(image,(image->resolution.x/10));
+ (void) WriteBlobFloat(image,(image->resolution.y/10));
}
else
- {
- (void) WriteBlobLong(image,0);
- (void) WriteBlobLong(image,0);
- }
+ if (image->units == PixelsPerInchResolution)
+ {
+ (void) WriteBlobFloat(image,(image->resolution.x/25.4));
+ (void) WriteBlobFloat(image,(image->resolution.y/25.4));
+ }
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/wbmp.c
^
|
@@ -381,7 +381,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/webp.c
^
|
@@ -811,7 +811,8 @@
/*
Allocate memory for pixels.
*/
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
*memory_info=AcquireVirtualMemory(image->columns,image->rows*
sizeof(*(picture->argb)));
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/xbm.c
^
|
@@ -538,7 +538,8 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Write X bitmap header.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/xpm.c
^
|
@@ -44,6 +44,7 @@
#include "MagickCore/blob.h"
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
+#include "MagickCore/coder-private.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
@@ -70,6 +71,7 @@
#include "MagickCore/module.h"
#include "MagickCore/threshold.h"
#include "MagickCore/utility.h"
+#include "coders/coders-private.h"

/*
Global declarations.
@@ -672,6 +674,9 @@
ImageInfo
*blob_info;
+ ImageType
+ type;
+
MagickBooleanType
status,
transparent;
@@ -718,16 +723,19 @@
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
SetGeometry(image,&geometry);
(void) ParseMetaGeometry(PiconGeometry,&geometry.x,&geometry.y,
&geometry.width,&geometry.height);
picon=ResizeImage(image,geometry.width,geometry.height,TriangleFilter,
exception);
blob_info=CloneImageInfo(image_info);
+ *blob_info->magick='\0';
(void) AcquireUniqueFilename(blob_info->filename);
+ type=IdentifyImageCoderType(image,exception);
if ((image_info->type != TrueColorType) &&
- (SetImageGray(image,exception) != MagickFalse))
+ (IsGrayImageType(type) != MagickFalse))
affinity_image=BlobToImage(blob_info,Graymap,GraymapExtent,exception);
else
affinity_image=BlobToImage(blob_info,Colormap,ColormapExtent,exception);
@@ -975,7 +983,8 @@
if (status == MagickFalse)
return(status);
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
opacity=(-1);
if (image->alpha_trait == UndefinedPixelTrait)
{
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/xwd.c
^
|
@@ -806,7 +806,8 @@
ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
if ((image->storage_class == PseudoClass) && (image->colors > 256))
(void) SetImageType(image,TrueColorType,exception);
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Initialize XWD file header.
*/
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/coders/yaml.c
^
|
@@ -74,6 +74,7 @@
#include "MagickCore/utility.h"
#include "MagickCore/version.h"
#include "MagickCore/module.h"
+#include "coders/coders-private.h"
/*
Typedef declarations.
@@ -1037,7 +1038,7 @@
}
YAMLFormatLocaleFile(file," units: %s\n",CommandOptionToMnemonic(
MagickResolutionOptions,(ssize_t) image->units));
- type=IdentifyImageType(image,exception);
+ type=IdentifyImageCoderType(image,exception);
YAMLFormatLocaleFile(file," type: %s\n",CommandOptionToMnemonic(
MagickTypeOptions,(ssize_t) type));
if (image->type != type)
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/config/ImageMagick.rdf.in
^
|
@@ -60,9 +60,9 @@
* Decorate: add a border or frame to an image.
* Special effects: blur, sharpen, threshold, or tint an image.
* Animation: create a GIF animation sequence from a group of images.
- * Text & comments: insert descriptive or artistic text in an image.
+ * Text & comments: insert descriptive or artistic text in an image.
* Image gradients: create a gradual blend of one color whose shape is
- horizontal, vertical, circular, or ellipical.
+ horizontal, vertical, circular, or elliptical.
* Image identification: describe the format and attributes of an image.
* Composite: overlap one image over another.
* Montage: juxtapose image thumbnails on an image canvas.
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/config/config.h.in
^
|
@@ -588,9 +588,6 @@
/* Define to 1 if you have the <sys/syslimits.h> header file. */
#undef HAVE_SYS_SYSLIMITS_H
-/* Define to 1 if you have the <sys/timeb.h> header file. */
-#undef HAVE_SYS_TIMEB_H
-
/* Define to 1 if you have the <sys/times.h> header file. */
#undef HAVE_SYS_TIMES_H
@@ -683,6 +680,9 @@
/* Define to 1 if you have the `utime' function. */
#undef HAVE_UTIME
+/* Define to 1 if you have the `utimensat' function. */
+#undef HAVE_UTIMENSAT
+
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+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-4.
+# Generated by GNU Autoconf 2.69 for ImageMagick 7.1.0-8.
#
# 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-4'
-PACKAGE_STRING='ImageMagick 7.1.0-4'
+PACKAGE_VERSION='7.1.0-8'
+PACKAGE_STRING='ImageMagick 7.1.0-8'
PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues'
PACKAGE_URL='https://imagemagick.org'
@@ -1176,7 +1176,6 @@
enable_zero_configuration
enable_hdri
enable_pipes
-enable_assert
enable_maintainer_mode
enable_hugepages
enable_ccmalloc
@@ -1198,6 +1197,7 @@
with_tcmalloc
with_umem
with_libstdc
+enable_assert
with_bzlib
with_x
with_zip
@@ -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-4 to adapt to many kinds of systems.
+\`configure' configures ImageMagick 7.1.0-8 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-4:";;
+ short | recursive ) echo "Configuration of ImageMagick 7.1.0-8:";;
esac
cat <<\_ACEOF
@@ -1972,7 +1972,6 @@
--enable-hdri accurately represent the wide range of intensity
levels found in real scenes
--enable-pipes enable pipes (|) in filenames
- --disable-assert disable assert() statements in build
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
@@ -2228,7 +2227,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ImageMagick configure 7.1.0-4
+ImageMagick configure 7.1.0-8
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3279,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-4, which was
+It was created by ImageMagick $as_me 7.1.0-8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4267,7 +4266,7 @@
# Define the identity of the package.
PACKAGE='ImageMagick'
- VERSION='7.1.0-4'
+ VERSION='7.1.0-8'
# Some tools Automake needs.
@@ -4560,11 +4559,11 @@
MAGICK_MICRO_VERSION=0
-MAGICK_PATCHLEVEL_VERSION=4
+MAGICK_PATCHLEVEL_VERSION=8
-MAGICK_VERSION=7.1.0-4
+MAGICK_VERSION=7.1.0-8
-MAGICK_GIT_REVISION=18921:159d06999:20210718
+MAGICK_GIT_REVISION=19096:957e47818:20210912
# Substitute library versioning
@@ -4586,15 +4585,15 @@
PACKAGE_BASE_VERSION=7.1.0
-PACKAGE_PATCHLEVEL_VERSION=4
+PACKAGE_PATCHLEVEL_VERSION=8
-PACKAGE_VERSION_ADDENDUM=-4
+PACKAGE_VERSION_ADDENDUM=-8
PACKAGE_LIB_VERSION=0x710
-PACKAGE_LIB_VERSION_NUMBER=7,1,0,4
+PACKAGE_LIB_VERSION_NUMBER=7,1,0,8
-PACKAGE_RELEASE_DATE=2021-07-18
+PACKAGE_RELEASE_DATE=2021-09-12
# Ensure that make can run correctly
@@ -22048,21 +22047,6 @@
MAGICK_FEATURES="Pipes $MAGICK_FEATURES"
fi
-# Build a version of ImageMagick with assert statements.
-# Check whether --enable-assert was given.
-if test "${enable_assert+set}" = set; then :
- enableval=$enable_assert; enable_assert=$enableval
-else
- enable_assert='yes'
-fi
-
-
-if test "$enable_assert" = 'no'; then
-
-$as_echo "#define NDEBUG 1" >>confdefs.h
-
-fi
-
# Don't emit "rebuild rules" for configure, Makefile.ins, etc.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
@@ -22755,7 +22739,7 @@
# Check additional headers
-for ac_header in arm/limits.h arpa/inet.h complex.h errno.h fcntl.h float.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h malloc.h netdb.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h stddef.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/uio.h sys/wait.h utime.h wchar.h xlocale.h
+for ac_header in arm/limits.h arpa/inet.h complex.h errno.h fcntl.h float.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h malloc.h netdb.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h stddef.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/times.h sys/uio.h sys/wait.h utime.h wchar.h xlocale.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -32908,7 +32892,7 @@
# Check for functions
#
-for ac_func in acosh _aligned_malloc aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock clock_getres clock_gettime ctime_r directio erf _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getpwnam_r getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkdir mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread putenv pwrite qsort_r raise rand_r readlink realpath select seekdir sendfile setlocale socket sqrt setvbuf stat strcasestr strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp system telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat
+for ac_func in acosh _aligned_malloc aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock clock_getres clock_gettime ctime_r directio erf _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getpwnam_r getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkdir mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread putenv pwrite qsort_r raise rand_r readlink realpath select seekdir sendfile setlocale socket sqrt setvbuf stat strcasestr strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp system telldir tempnam times ulltostr uselocale usleep utime utimensat vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -36864,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-4, which was
+This file was extended by ImageMagick $as_me 7.1.0-8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -36931,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-4
+ImageMagick config.status 7.1.0-8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+obs1.1.tar.xz/upstream/configure.ac
^
|
@@ -33,12 +33,12 @@
m4_esyscmd([
c=$(git log --full-history --format=tformat:. HEAD | wc -l)
h=$(git rev-parse --short HEAD)
- d=$(date +%Y%m%d)
+ d=$(date -u +%Y%m%d)
printf %s "$c:$h:$d"
]))
m4_define([magick_release_date],
m4_esyscmd([
- d=$(date +%F -r ./ChangeLog)
+ d=$(date -u +%F -r ./ChangeLog)
printf %s "$d"
]))
@@ -690,17 +690,6 @@
MAGICK_FEATURES="Pipes $MAGICK_FEATURES"
fi
-# Build a version of ImageMagick with assert statements.
-AC_ARG_ENABLE([assert],
- [AC_HELP_STRING([--disable-assert],
- [disable assert() statements in build])],
- [enable_assert=$enableval],
- [enable_assert='yes'])
-
-if test "$enable_assert" = 'no'; then
- AC_DEFINE([NDEBUG],[1],[Turn off assert statements])
-fi
-
# Don't emit "rebuild rules" for configure, Makefile.ins, etc.
AM_MAINTAINER_MODE
@@ -953,7 +942,7 @@
AC_HEADER_DIRENT
# Check additional headers
-AC_CHECK_HEADERS(arm/limits.h arpa/inet.h complex.h errno.h fcntl.h float.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h malloc.h netdb.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h stddef.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/uio.h sys/wait.h utime.h wchar.h xlocale.h)
+AC_CHECK_HEADERS(arm/limits.h arpa/inet.h complex.h errno.h fcntl.h float.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h malloc.h netdb.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h stddef.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/times.h sys/uio.h sys/wait.h utime.h wchar.h xlocale.h)
########
#
@@ -2978,7 +2967,7 @@
# Check for functions
#
-AC_CHECK_FUNCS([acosh _aligned_malloc aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock clock_getres clock_gettime ctime_r directio erf _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getpwnam_r getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkdir mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread putenv pwrite qsort_r raise rand_r readlink realpath select seekdir sendfile setlocale socket sqrt setvbuf stat strcasestr strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp system telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([acosh _aligned_malloc aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock clock_getres clock_gettime ctime_r directio erf _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getpwnam_r getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkdir mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread putenv pwrite qsort_r raise rand_r readlink realpath select seekdir sendfile setlocale socket sqrt setvbuf stat strcasestr strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp system telldir tempnam times ulltostr uselocale usleep utime utimensat vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
# Substitute compiler name to build/link PerlMagick
#
|
[-]
[+]
|
Changed |
_service:tar_git:ImageMagick-7.1.0.8+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], [4])
+m4_define([magick_patchlevel_version], [8])
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 !!!
### Also, the builds script needs this to not be a macro
-Version: 7.1.0.4
+Version: 7.1.0.8
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;4'
+ - 'mfr_revision;8'
- 'maj;7'
- 'mfr_version;%{maj}.1.0'
- 'quantum_depth;16'
|