diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-10 18:10:49 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-11 20:06:36 +0200 |
commit | acfc02c1747065fe450c7cfeb6f1844b62335f08 (patch) | |
tree | 5887806a2e6b99bbb0255e013a9028810e230a7f /toolbin | |
parent | Import Ghostscript 9.52 (diff) | |
download | ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2 ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip |
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'toolbin')
85 files changed, 1003 insertions, 658 deletions
diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln b/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln index de3d9ba6..49ca8962 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln @@ -1,6 +1,8 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30104.148 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Acrobat2Tiff", "Acrobat2Tiff\Acrobat2Tiff.vbproj", "{7A41EF6A-2A49-4018-94E7-CE144E33D39D}" EndProject Global @@ -17,4 +19,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9154FE35-6D39-44CF-B5F8-553507580CBC} + EndGlobalSection EndGlobal diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb index 286a81f7..6feba51e 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb @@ -15,8 +15,8 @@ Module Acrobat2Tiff Console.WriteLine(" using [ -gray | -mono | -rgb | -cmyk ]") Console.WriteLine(" Resolution defaults to 72dpi, but may be specified e.g. -r 300") Console.WriteLine("") - Console.WriteLine("Tested with Acrobat 9.0, will hopefully work with 7/8/10/11/DC too.") - Console.WriteLine("Ensure you have no other Acrobat processes running, or the colorspace") + Console.WriteLine("Tested with Acrobat 9.0, will hopefully work with 7/8/10/11/DC too.") + Console.WriteLine("Ensure you have no other Acrobat processes running, or the colorspace") Console.WriteLine("and Resolution of output images may be wrong.") End Sub @@ -45,10 +45,11 @@ Module Acrobat2Tiff Dim i As Integer Dim cspace As Integer Dim infile As String - Dim outfile As String + Dim outfile As String + Dim result As Integer - ' Set defaults - infile = "" + ' Set defaults + infile = "" outfile = "" res = 72 cspace = 1 @@ -95,14 +96,14 @@ Module Acrobat2Tiff Return End If - 'Console.WriteLine("Input: '" & infile & "'") - 'Console.WriteLine("Output: '" & outfile & "'") - 'Console.WriteLine("Resolution: " & CStr(res)) - 'Console.WriteLine("CSpace: " & CStr(cspace)) + Console.WriteLine("Input: '" & infile & "'") + Console.WriteLine("Output: '" & outfile & "'") + Console.WriteLine("Resolution: " & CStr(res)) + Console.WriteLine("CSpace: " & CStr(cspace)) - ' Set the registry values - setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\7.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) - setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\8.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) + ' Set the registry values + setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\7.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) + setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\8.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\10.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) @@ -114,17 +115,19 @@ Module Acrobat2Tiff ' Create Acrobat Document object PDDoc = CreateObject("AcroExch.PDDoc") - ' Open PDF file - PDDoc.Open(infile) + ' Open PDF file + result = PDDoc.Open(infile) - ' Hide Acrobat application so everything is done in silent mode - PDFApp.Hide() + ' Hide Acrobat application so everything is done in silent mode + 'PDFApp.Hide() - ' Create Javascript bridge object - JSObj = PDDoc.GetJSObject() + ' Create Javascript bridge object - ' Create Tiff file - JSObj.SaveAs(outfile, "com.adobe.acrobat.tiff") + JSObj = PDDoc.GetJSObject + result = PDDoc.GetNumPages + + ' Create Tiff file + JSObj.SaveAs(outfile, "com.adobe.acrobat.tiff") PDDoc.Close() PDFApp.CloseAllDocs() diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj index 2d53c902..788eca7a 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="Current"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -11,6 +11,11 @@ <RootNamespace>Acrobat2Tiff</RootNamespace> <AssemblyName>Acrobat2Tiff</AssemblyName> <MyType>Console</MyType> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>2.0</OldToolsVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -19,7 +24,7 @@ <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>Acrobat2Tiff.xml</DocumentationFile> - <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -28,7 +33,7 @@ <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>Acrobat2Tiff.xml</DocumentationFile> - <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn> </PropertyGroup> <ItemGroup> <Reference Include="System" /> @@ -50,6 +55,7 @@ <Compile Include="Acrobat2Tiff\Application.Designer.vb"> <AutoGen>True</AutoGen> <DependentUpon>Application.myapp</DependentUpon> + <DesignTime>True</DesignTime> </Compile> <Compile Include="Acrobat2Tiff\Resources.Designer.vb"> <AutoGen>True</AutoGen> @@ -91,6 +97,9 @@ <Isolated>False</Isolated> </COMReference> </ItemGroup> + <ItemGroup> + <Folder Include="My Project\" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb index df166d72..88dd01c7 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. -' Runtime Version:2.0.50727.3603 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb index 5ebe3541..e019990c 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. -' Runtime Version:2.0.50727.3603 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -11,6 +11,7 @@ Option Strict On Option Explicit On +Imports System Namespace My.Resources @@ -18,10 +19,10 @@ Namespace My.Resources 'class via a tool like ResGen or Visual Studio. 'To add or remove a member, edit your .ResX file then rerun ResGen 'with the /str option, or rebuild your VS project. - '<summary> - ' A strongly-typed resource class, for looking up localized strings, etc. - '</summary> - <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _ + '''<summary> + ''' A strongly-typed resource class, for looking up localized strings, etc. + '''</summary> + <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ @@ -31,9 +32,9 @@ Namespace My.Resources Private resourceCulture As Global.System.Globalization.CultureInfo - '<summary> - ' Returns the cached ResourceManager instance used by this class. - '</summary> + '''<summary> + ''' Returns the cached ResourceManager instance used by this class. + '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get @@ -45,16 +46,16 @@ Namespace My.Resources End Get End Property - '<summary> - ' Overrides the current thread's CurrentUICulture property for all - ' resource lookups using this strongly typed resource class. - '</summary> + '''<summary> + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) + Set resourceCulture = value End Set End Property diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb index 17ea681f..6ef3ea50 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. -' Runtime Version:2.0.50727.3603 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -13,61 +13,18 @@ Option Explicit On Namespace My - + <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ - Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0"), _ - Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Partial Friend NotInheritable Class MySettings + Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")> _ + Partial Friend NotInheritable Class Settings Inherits Global.System.Configuration.ApplicationSettingsBase - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings) -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As MySettings + Public Shared ReadOnly Property [Default]() As Settings Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If Return defaultInstance End Get End Property End Class End Namespace - -Namespace My - - <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ - Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ - Friend Module MySettingsProperty - - <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ - Friend ReadOnly Property Settings() As Global.Acrobat2Tiff.My.MySettings - Get - Return Global.Acrobat2Tiff.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/toolbin/GenSubstCID.ps b/toolbin/GenSubstCID.ps Binary files differindex 59863df3..12fb96ca 100644 --- a/toolbin/GenSubstCID.ps +++ b/toolbin/GenSubstCID.ps diff --git a/toolbin/afmutil.py b/toolbin/afmutil.py index e4856f69..375380a1 100755 --- a/toolbin/afmutil.py +++ b/toolbin/afmutil.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -## Copyright (C) 2001-2019 Artifex Software, Inc. +## Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/bmpcmp.c b/toolbin/bmpcmp.c index 1ab6b64a..78b7ef7b 100644 --- a/toolbin/bmpcmp.c +++ b/toolbin/bmpcmp.c @@ -16,6 +16,14 @@ #include <png.h> #endif +#ifdef HAVE_LIBTIFF +#include "tiffio.h" +#endif + +#ifdef COLOR_MANAGED +#include "lcms2mt.h" +#endif + #ifndef BETTER_CMYK #define BETTER_CMYK 1 #endif @@ -85,17 +93,21 @@ typedef struct int bpp; /* Output BMP sizes */ BBox output_size; + /* lab flag */ + int lab; } Params; typedef struct ImageReader { FILE *file; + const char* file_name; void *(*read)(struct ImageReader *, int *w, int *h, int *s, int *bpp, - int *cmyk); + int *cmyk, + void **lab); } ImageReader; /* @@ -125,6 +137,17 @@ static void *Malloc(size_t size) { return block; } +static void* Calloc(size_t size) { + void* block; + + block = calloc(size, 1); + if (block == NULL) { + fprintf(stderr, "bmpcmp: Failed to calloc %u bytes\n", (unsigned int)size); + exit(EXIT_FAILURE); + } + return block; +} + static void putword(unsigned char *buf, int word) { buf[0] = word; buf[1] = (word>>8); @@ -365,7 +388,8 @@ static void *bmp_read(ImageReader *im, int *height, int *span, int *bpp, - int *cmyk) + int *cmyk, + void **lab) { int offset; long filelen, filepos; @@ -374,6 +398,7 @@ static void *bmp_read(ImageReader *im, /* No CMYK bmp support */ *cmyk = 0; + *lab = NULL; filepos = ftell(im->file); fseek(im->file, 0, SEEK_END); @@ -445,12 +470,15 @@ static void *cups_read(ImageReader *im, int *span, int *bpp, int *cmyk, - int rev) + int rev, + void **lab) { unsigned char *data, *d; int c, x, y, b, bpc, bpl; int colspace; + *lab = NULL; + if (skip_bytes(im->file, 372) == EOF) return NULL; *width = get_int(im->file, rev); @@ -526,9 +554,10 @@ static void *cups_read_le(ImageReader *im, int *height, int *span, int *bpp, - int *cmyk) + int *cmyk, + void **lab) { - return cups_read(im, width, height, span, bpp, cmyk, 0); + return cups_read(im, width, height, span, bpp, cmyk, 0, lab); } static void *cups_read_be(ImageReader *im, @@ -536,9 +565,10 @@ static void *cups_read_be(ImageReader *im, int *height, int *span, int *bpp, - int *cmyk) + int *cmyk, + void **lab) { - return cups_read(im, width, height, span, bpp, cmyk, 1); + return cups_read(im, width, height, span, bpp, cmyk, 1, lab); } static void skip_to_eol(FILE *file) @@ -955,12 +985,15 @@ static void *pnm_read(ImageReader *im, int *height, int *span, int *bpp, - int *cmyk) + int *cmyk, + void **lab) { unsigned char *bmp; int c, maxval; void (*read)(FILE *, int, int, int, unsigned char *); + *lab = NULL; + c = fgetc(im->file); /* Skip over any white space before the P */ while ((c != 'P') && (c != EOF)) { @@ -1017,20 +1050,271 @@ static void *pnm_read(ImageReader *im, return bmp; } +#ifdef HAVE_LIBTIFF +static tmsize_t tiff_cread(thandle_t im_, + void *buf, + tmsize_t n) +{ + ImageReader *im = (ImageReader *)im_; + return fread(buf, 1, n, im->file); +} + +static tmsize_t tiff_cwrite(thandle_t im_, + void *buf, + tmsize_t n) +{ + return 0; +} + +static toff_t tiff_cseek(thandle_t im_, + toff_t offset, + int whence) +{ + ImageReader *im = (ImageReader *)im_; + fseek(im->file, (long)offset, whence); + return (toff_t)ftell(im->file); +} + +static int tiff_cclose(thandle_t im_) +{ + return 0; +} + +static toff_t tiff_csize(thandle_t im_) +{ + ImageReader *im = (ImageReader *)im_; + long pos = ftell(im->file); + toff_t size; + + fseek(im->file, 0, SEEK_END); + size = (toff_t)ftell(im->file); + fseek(im->file, pos, SEEK_SET); + return size; +} + +static void* tif_read(ImageReader* im, + int* im_width, + int* im_height, + int* span, + int* bpp, + int* cmyk, + void **lab) +{ + TIFF* tif; + uint16 compression; + uint16 bpc, num_comps, planar, photometric; + uint32 row; + int is_tiled; + unsigned char *data, *row_ptr, *data_lab = NULL; + tdata_t buf; + uint32 width; + uint32 height; + void* picc = NULL; + uint32 icc_size; + int has_icc = 0; +#ifdef COLOR_MANAGED + cmsHPROFILE icc_profile, hLab; + cmsHTRANSFORM icc_transform; + cmsContext ctx; +#endif + + *lab = NULL; + + /* There is only one image in each file */ + if (ftell(im->file) != 0) + return NULL; + + tif = TIFFClientOpen(im->file_name, "rb", + (thandle_t)im, + tiff_cread, tiff_cwrite, + tiff_cseek, tiff_cclose, + tiff_csize, + NULL, NULL/* map/unmap */); + + if (tif == NULL) { + fprintf(stderr, "bmpcmp: TIFF failed to parse\n"); + exit(1); + } + + TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression); + if (compression == COMPRESSION_JPEG) { + fprintf(stderr, "bmpcmp: JPEG compression not supported for TIFF\n"); + exit(1); + } + + TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric); + if (!(photometric == PHOTOMETRIC_SEPARATED || + photometric == PHOTOMETRIC_RGB)) { + fprintf(stderr, "bmpcmp: Photometric encoding not supported for TIFF\n"); + exit(1); + } + + TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &num_comps); + if (num_comps != 3 && photometric == PHOTOMETRIC_RGB) { + fprintf(stderr, "bmpcmp: Alpha not supported for TIFF\n"); + exit(1); + } + if (num_comps != 4 && photometric == PHOTOMETRIC_SEPARATED) { + fprintf(stderr, "bmpcmp: Alpha not supported for TIFF\n"); + exit(1); + } + + TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width); + TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height); + TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bpc); + TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planar); + + if (width == 0 || height == 0 || bpc == 0 || num_comps == 0) { + fprintf(stderr, "bmpcmp: Bad TIFF content!\n"); + exit(1); + } + if (bpc != 8) { + fprintf(stderr, "bmpcmp: Only support 8 bpc TIFF!\n"); + exit(1); + } + if (num_comps != 1 && num_comps != 3 && num_comps != 4) { + fprintf(stderr, "bmpcmp: Only support Gray, RGB or CMYK TIFF!\n"); + exit(1); + } + if (num_comps != 4 && planar == PLANARCONFIG_SEPARATE) { + fprintf(stderr, "bmpcmp: Only support planar TIFFs if they are CMYK!\n"); + exit(1); + } + + is_tiled = TIFFIsTiled(tif); + if (is_tiled) { + fprintf(stderr, "bmpcmp: TIFF tiled format not supported!\n"); + exit(1); + } +#ifdef COLOR_MANAGED + has_icc = TIFFGetField(tif, TIFFTAG_ICCPROFILE, &icc_size, &picc); + if (has_icc) { + uint32 data_type = TYPE_CMYK_8; + + /* Set our own error handling function */ + ctx = cmsCreateContext(NULL, NULL); + if (ctx == NULL) { + fprintf(stderr, "bmpcmp: Failed in ICC profile handling!\n"); + exit(1); + } + icc_profile = cmsOpenProfileFromMem(ctx, picc, icc_size); + if (icc_profile == NULL) { + fprintf(stderr, "bmpcmp: Failed in ICC profile handling!\n"); + exit(EXIT_FAILURE); + } + hLab = cmsCreateLab4Profile(ctx, NULL); + if (hLab == NULL) { + fprintf(stderr, "bmpcmp: Failed in ICC profile handling!\n"); + exit(EXIT_FAILURE); + } + if (num_comps == 1) + data_type = TYPE_GRAY_8; + else if (num_comps == 3) + data_type = TYPE_RGB_8; + + /* Data will be alpha Lab */ + icc_transform = cmsCreateTransform(ctx, icc_profile, data_type, hLab, + TYPE_ALab_8, INTENT_RELATIVE_COLORIMETRIC, 0); + if (icc_transform == NULL) { + fprintf(stderr, "bmpcmp: Failed in ICC profile handling!\n"); + exit(EXIT_FAILURE); + } + + /* Do calloc just to make sure alpha value is known */ + data_lab = Calloc(height * width * 4); + *lab = data_lab; + } +#endif + + data = Malloc(height * width * 4); + row_ptr = data + (height - 1) * width * 4; + + buf = _TIFFmalloc(TIFFScanlineSize(tif)); + if (buf == NULL) { + fprintf(stderr, "bmpcmp: TIFF malloc failed\n"); + exit(1); + } + if (planar == PLANARCONFIG_CONTIG) { + for (row = 0; row < height; row++) { + TIFFReadScanline(tif, buf, row, 0); + if (num_comps == 4) + memcpy(row_ptr, buf, width * 4); + else if (num_comps == 3) { + uint32 i; + char *out = (char *)row_ptr; + const char *in = (const char *)buf; + for (i = width; i != 0; i--) { + *out++ = in[2]; + *out++ = in[1]; + *out++ = in[0]; + *out++ = 0; + in += 3; + } + } else if (num_comps == 1) { + uint32 i; + char *out = (char *)row_ptr; + const char *in = (const char *)buf; + for (i = width; i != 0; i--) { + *out++ = *in; + *out++ = *in; + *out++ = *in++; + *out++ = 0; + } + } + row_ptr -= (width * 4); + } + } else if (planar == PLANARCONFIG_SEPARATE) { + uint16 s, nsamples; + + TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nsamples); + for (s = 0; s < nsamples; s++) + for (row = 0; row < height; row++) { + TIFFReadScanline(tif, buf, row, s); + memcpy(row_ptr, buf, width * 4); + row_ptr -= (width * 4); + } + } + +#ifdef COLOR_MANAGED + if (data_lab != NULL) { + cmsDoTransform(NULL, icc_transform, data, data_lab, width* height); + cmsDeleteTransform(NULL, icc_transform); + cmsCloseProfile(NULL, icc_profile); + cmsCloseProfile(NULL, hLab); + cmsDeleteContext(ctx); + } +#endif + _TIFFfree(buf); + TIFFClose(tif); + + *im_width = width; + *im_height = height; + *span = width * 4; + *bpp = 32; + *cmyk = num_comps == 4; + + return data; +} +#endif + #ifdef HAVE_LIBPNG static void *png_read(ImageReader *im, int *width, int *height, int *span, int *bpp, - int *cmyk) + int *cmyk, + void **lab) { png_structp png; png_infop info; - int stride, w, h, y, x; + size_t stride; + int w, h, y, x; unsigned char *data; int expand = 0; + *lab = NULL; + /* There is only one image in each file */ if (ftell(im->file) != 0) return NULL; @@ -1088,8 +1372,8 @@ static void *png_read(ImageReader *im, *width = w; *height = h; - *span = stride; - *bpp = (stride * 8) / w; + *span = (int) stride; + *bpp = (int) (stride * 8) / w; *cmyk = 0; return data; } @@ -1100,12 +1384,15 @@ static void *psd_read(ImageReader *im, int *height, int *span, int *bpp, - int *cmyk) + int *cmyk, + void **lab) { int c, ir_len, w, h, n, x, y, z, N; unsigned char *bmp, *line, *ptr; int bpc; + *lab = NULL; + if (feof(im->file)) return NULL; @@ -1403,6 +1690,7 @@ static void image_open(ImageReader *im, fprintf(stderr, "bmpcmp: %s failed to open\n", filename); exit(EXIT_FAILURE); } + im->file_name = filename; /* Identify the filetype */ type = fgetc(im->file); @@ -1426,6 +1714,11 @@ static void image_open(ImageReader *im, im->read = cups_read_be; else goto fail; +#ifdef HAVE_LIBTIFF + } else if (type == 0x49 || type == 0x4D) { + im->read = tif_read; + ungetc(type, im->file); +#endif } else { type |= (fgetc(im->file)<<8); if (type == 0x4d42) { /* BM */ @@ -1586,6 +1879,56 @@ struct FuzzyParams { unsigned char *map); }; +/* Data is alpha, L,a,b */ +static int fuzzy_slow_lab(FuzzyParams* fuzzy_params, + unsigned char* isrc, + unsigned char* isrc2, + unsigned char* map, + int x, + int y) +{ + int xmin, ymin, xmax, ymax; + int span, t; + + /* left of window = max(0, x - window) - x */ + xmin = -fuzzy_params->window; + if (xmin < -x) + xmin = -x; + /* right of window = min(width, x + window) - x */ + xmax = fuzzy_params->window; + if (xmax > fuzzy_params->width - x) + xmax = fuzzy_params->width - x; + /* top of window = max(0, y - window) - y */ + ymin = -fuzzy_params->window; + if (ymin < -y) + ymin = -y; + /* bottom of window = min(height, y + window) - y */ + ymax = fuzzy_params->window; + if (ymax > fuzzy_params->height - y) + ymax = fuzzy_params->height - y; + span = fuzzy_params->span; + t = fuzzy_params->threshold; + + for (y = ymin; y < ymax; y++) + { + for (x = xmin; x < xmax; x++) + { + int o = x * 4 + y * span; + float v; + + /* dE^2 */ + v = (((float) isrc[1] - (float) isrc2[o + 1]) * ((float) isrc[1] - (float) isrc2[o + 1]) / (6.5536f)) + + ((float) isrc[2] - (float) isrc2[o + 2]) * ((float) isrc[2] - (float) isrc2[o + 2]) + + ((float) isrc[3] - (float) isrc2[o + 3]) * ((float) isrc[3] - (float) isrc2[o + 3]); + + if (v <= t) + return 0; + } + } + *map |= 15; + return 1; +} + static int fuzzy_slow(FuzzyParams *fuzzy_params, unsigned char *isrc, unsigned char *isrc2, @@ -1730,6 +2073,32 @@ static int fuzzy_slow_exhaustive(FuzzyParams *fuzzy_params, return ret; } +/* Data is alpha, L,a,b */ +static int fuzzy_fast_lab(FuzzyParams* fuzzy_params, + unsigned char* isrc, + unsigned char* isrc2, + unsigned char* map) +{ + int i; + ptrdiff_t* wTab = fuzzy_params->wTab; + int t = fuzzy_params->threshold; + + for (i = fuzzy_params->wTabLen; i > 0; i--) + { + ptrdiff_t o = *wTab++; + float v; + + /* dE^2 */ + v = (((float) isrc[1] - (float) isrc2[o + 1]) * ((float) isrc[1] - (float) isrc2[o + 1]) / (6.5536f)) + + ((float) isrc[2] - (float) isrc2[o + 2]) * ((float) isrc[2] - (float) isrc2[o + 2]) + + ((float) isrc[3] - (float) isrc2[o + 3]) * ((float) isrc[3] - (float) isrc2[o + 3]); + if (v <= t) + return 0; + } + *map |= 15; + return 1; +} + static int fuzzy_fast(FuzzyParams *fuzzy_params, unsigned char *isrc, unsigned char *isrc2, @@ -1858,6 +2227,9 @@ static void fuzzy_diff_int(unsigned char *bmp, { fuzzy_params.slowFn = fuzzy_slow_exhaustive; fuzzy_params.fastFn = fuzzy_fast_exhaustive; + } else if (params->lab) { + fuzzy_params.slowFn = fuzzy_slow_lab; + fuzzy_params.fastFn = fuzzy_fast_lab; } else { fuzzy_params.slowFn = fuzzy_slow; fuzzy_params.fastFn = fuzzy_fast; @@ -2501,7 +2873,6 @@ lookup(int c, int m, int y, int k, int rx, ry, rz; int x0, y0, z0; int X0, X1, Y0, Y1, Z0, Z1; - int i; int c0, c1, c2, c3, Rest; int OutChan; int Tmp1[3], Tmp2[3]; @@ -3006,6 +3377,7 @@ static void syntax(void) fprintf(stderr, " -t <threshold> or -t<threshold> threshold (default=0)\n"); fprintf(stderr, " -e exhaustive search\n"); fprintf(stderr, " -o <minx> <maxx> <miny> <maxy> Output bitmap size hints (0 for default)\n"); + fprintf(stderr, " -l Use dE^2 diff in CIELAB (only for tiffs with icc profiles)\n"); fprintf(stderr, " -h or --help or -? Output this message and exit\n"); fprintf(stderr, "\n"); fprintf(stderr, " <file1> and <file2> can be " @@ -3079,6 +3451,9 @@ static void parseArgs(int argc, char *argv[], Params *params) case 'e': params->exhaustive = 1; break; + case 'l': + params->lab = 1; + break; case 'h': case '?': case '-': /* Hack :) */ @@ -3313,21 +3688,32 @@ int main(int argc, char *argv[]) DiffFn *diffFn; Params params; int noDifferences = 1; + int can_compare = 1; + void *lab1, *lab2; parseArgs(argc, argv, ¶ms); if (params.window <= 1 && params.threshold == 0) { diffFn = simple_diff; + if (params.lab) { + fprintf(stderr, "bmpcmp: LAB comparison requires window > 1 and threshold > 0\n"); + } } else { diffFn = fuzzy_diff; } +#ifndef COLOR_MANAGED + if (params.lab) { + fprintf(stderr, "bmpcmp: LAB comparison selected but bmp compiled without cmm!\n"); + } +#endif + image_open(&image1, params.filename1); image_open(&image2, params.filename2); imagecount = 0; while (((bmp2 = NULL, - bmp = image1.read(&image1,&w, &h, &s, &bpp, &cmyk )) != NULL) && - ((bmp2 = image2.read(&image2,&w2,&h2,&s2,&bpp2,&cmyk2)) != NULL)) + bmp = image1.read(&image1, &w, &h, &s, &bpp, &cmyk, &lab1)) != NULL) && + ((bmp2 = image2.read(&image2, &w2, &h2, &s2, &bpp2, &cmyk2, &lab2)) != NULL)) { imagecount++; /* Check images are compatible */ @@ -3335,9 +3721,16 @@ int main(int argc, char *argv[]) (cmyk != cmyk2)) { fprintf(stderr, - "bmpcmp: Page %d: Can't compare images " - "(w=%d,%d) (h=%d,%d) (s=%d,%d) (bpp=%d,%d) (cmyk=%d,%d)!\n", - imagecount, w, w2, h, h2, s, s2, bpp, bpp2, cmyk, cmyk2); + "bmpcmp: Page %d: Can't compare images " + "(w=%d,%d) (h=%d,%d) (s=%d,%d) (bpp=%d,%d) (cmyk=%d,%d)!\n", + imagecount, w, w2, h, h2, s, s2, bpp, bpp2, cmyk, cmyk2); + can_compare = 0; + continue; + } + + if (params.lab && (lab1 == NULL || lab2 == NULL)) { + fprintf(stderr, "bmpcmp: Lab compare failed (only valid for tiffs with icc profiles)\n"); + can_compare = 0; continue; } @@ -3345,13 +3738,19 @@ int main(int argc, char *argv[]) { makeWindowTable(¶ms, s, bpp); } - map = Malloc(s*h*sizeof(unsigned char)); - memset(map, 0, s*h*sizeof(unsigned char)); - params.width = w; + map = Malloc(s * h * sizeof(unsigned char)); + memset(map, 0, s * h * sizeof(unsigned char)); + params.width = w; params.height = h; - params.span = s; - params.bpp = bpp; - (*diffFn)(bmp, bmp2, map, &bbox, ¶ms); + params.span = s; + params.bpp = bpp; + + if (params.lab) { + (*diffFn)(lab1, lab2, map, &bbox, ¶ms); + } else { + (*diffFn)(bmp, bmp2, map, &bbox, ¶ms); + } + if ((bbox.xmin <= bbox.xmax) && (bbox.ymin <= bbox.ymax)) { /* Make the bbox sensibly exclusive */ @@ -3511,6 +3910,8 @@ int main(int argc, char *argv[]) free(bmp); free(bmp2); free(map); + free(lab1); + free(lab2); } done: @@ -3527,12 +3928,15 @@ done: imagecount+1, params.filename2); exit(EXIT_FAILURE); } + /* Also count as a failure if the images are different sizes, color, bits etc */ + if (can_compare == 0) + exit(EXIT_FAILURE); image_close(&image1); image_close(&image2); if (noDifferences == 1) - fprintf(stderr, "bmpcmp: no differences detected\n"); + fprintf(stderr, "bmpcmp: no differences detected\n"); return EXIT_SUCCESS; } diff --git a/toolbin/bmpcmp.sln b/toolbin/bmpcmp.sln index 6b371ad7..44e3c45d 100644 --- a/toolbin/bmpcmp.sln +++ b/toolbin/bmpcmp.sln @@ -1,26 +1,35 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmpcmp", "bmpcmp.vcproj", "{460A58D8-7094-48EC-B996-F456D1BD08A9}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30104.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmpcmp", "bmpcmp.vcxproj", "{460A58D8-7094-48EC-B996-F456D1BD08A9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|Win326 = Debug|Win326 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|Win326 = Release|Win326 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {460A58D8-7094-48EC-B996-F456D1BD08A9}.Debug|Win32.ActiveCfg = Debug|Win32 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Debug|Win32.Build.0 = Debug|Win32 + {460A58D8-7094-48EC-B996-F456D1BD08A9}.Debug|Win326.ActiveCfg = Debug|Win32 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Debug|x64.ActiveCfg = Debug|x64 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Debug|x64.Build.0 = Debug|x64 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Release|Win32.ActiveCfg = Release|Win32 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Release|Win32.Build.0 = Release|Win32 + {460A58D8-7094-48EC-B996-F456D1BD08A9}.Release|Win326.ActiveCfg = Release|Win32 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Release|x64.ActiveCfg = Release|x64 {460A58D8-7094-48EC-B996-F456D1BD08A9}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E5CB3F49-D596-4CFF-A2E8-900228D88E11} + EndGlobalSection EndGlobal diff --git a/toolbin/bmpcmp.vcproj b/toolbin/bmpcmp.vcproj deleted file mode 100644 index 03bdf202..00000000 --- a/toolbin/bmpcmp.vcproj +++ /dev/null @@ -1,454 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="bmpcmp" - ProjectGUID="{460A58D8-7094-48EC-B996-F456D1BD08A9}" - RootNamespace="bmpcmp" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\libpng;..\zlib;..\debugobj\" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;/DHAVE_LIBPNG" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\libpng;..\zlib;..\debugobj\" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;/DHAVE_LIBPNG" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\libpng;..\zlib;..\debugobj\" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;/DHAVE_LIBPNG" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\libpng;..\zlib;..\debugobj\" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;/DHAVE_LIBPNG" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath="..\zlib\adler32.c" - > - </File> - <File - RelativePath=".\bmpcmp.c" - > - </File> - <File - RelativePath="..\zlib\compress.c" - > - </File> - <File - RelativePath="..\zlib\crc32.c" - > - </File> - <File - RelativePath="..\zlib\deflate.c" - > - </File> - <File - RelativePath="..\zlib\infback.c" - > - </File> - <File - RelativePath="..\zlib\inffast.c" - > - </File> - <File - RelativePath="..\zlib\inflate.c" - > - </File> - <File - RelativePath="..\zlib\inftrees.c" - > - </File> - <File - RelativePath="..\libpng\png.c" - > - </File> - <File - RelativePath="..\libpng\pngerror.c" - > - </File> - <File - RelativePath="..\libpng\pngget.c" - > - </File> - <File - RelativePath="..\libpng\pngmem.c" - > - </File> - <File - RelativePath="..\libpng\pngpread.c" - > - </File> - <File - RelativePath="..\libpng\pngread.c" - > - </File> - <File - RelativePath="..\libpng\pngrio.c" - > - </File> - <File - RelativePath="..\libpng\pngrtran.c" - > - </File> - <File - RelativePath="..\libpng\pngrutil.c" - > - </File> - <File - RelativePath="..\libpng\pngset.c" - > - </File> - <File - RelativePath="..\libpng\pngtrans.c" - > - </File> - <File - RelativePath="..\libpng\pngwio.c" - > - </File> - <File - RelativePath="..\libpng\pngwrite.c" - > - </File> - <File - RelativePath="..\libpng\pngwtran.c" - > - </File> - <File - RelativePath="..\libpng\pngwutil.c" - > - </File> - <File - RelativePath="..\zlib\trees.c" - > - </File> - <File - RelativePath="..\zlib\uncompr.c" - > - </File> - <File - RelativePath="..\zlib\zutil.c" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/toolbin/bmpcmp.vcxproj b/toolbin/bmpcmp.vcxproj new file mode 100644 index 00000000..bca54758 --- /dev/null +++ b/toolbin/bmpcmp.vcxproj @@ -0,0 +1,267 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{460A58D8-7094-48EC-B996-F456D1BD08A9}</ProjectGuid> + <RootNamespace>bmpcmp</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>16.0.30028.132</_ProjectFileVersion> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>Debug\</OutDir> + <IntDir>Debug\</IntDir> + <LinkIncremental>true</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <OutDir>Release\</OutDir> + <IntDir>Release\</IntDir> + <LinkIncremental>true</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <OutDir>$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(Platform)\$(Configuration)\</IntDir> + <LinkIncremental>true</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <OutDir>$(Platform)\$(Configuration)\</OutDir> + <IntDir>$(Platform)\$(Configuration)\</IntDir> + <LinkIncremental>true</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\lcms2mt\include;..\libpng;..\zlib;..\debugobj\;..\tiff\libtiff;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>COLOR_MANAGED;WIN32;_DEBUG;_CONSOLE;HAVE_LIBPNG;HAVE_LIBTIFF;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>..\lcms2mt\include;..\libpng;..\zlib;..\debugobj\;..\tiff\libtiff;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>COLOR_MANAGED;WIN32;NDEBUG;_CONSOLE;HAVE_LIBPNG;HAVE_LIBTIFF;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\lcms2mt\include;..\libpng;..\zlib;..\debugobj\;..\tiff\libtiff;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>COLOR_MANAGED;WIN32;_DEBUG;_CONSOLE;HAVE_LIBPNG;HAVE_LIBTIFF;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX64</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>..\lcms2mt\include;..\libpng;..\zlib;..\debugobj\;..\tiff\libtiff;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>COLOR_MANAGED;WIN32;NDEBUG;_CONSOLE;HAVE_LIBPNG;HAVE_LIBTIFF;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX64</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\lcms2mt\src\cmsalpha.c" /> + <ClCompile Include="..\lcms2mt\src\cmscam02.c" /> + <ClCompile Include="..\lcms2mt\src\cmscgats.c" /> + <ClCompile Include="..\lcms2mt\src\cmscnvrt.c" /> + <ClCompile Include="..\lcms2mt\src\cmserr.c" /> + <ClCompile Include="..\lcms2mt\src\cmsgamma.c" /> + <ClCompile Include="..\lcms2mt\src\cmsgmt.c" /> + <ClCompile Include="..\lcms2mt\src\cmshalf.c" /> + <ClCompile Include="..\lcms2mt\src\cmsintrp.c" /> + <ClCompile Include="..\lcms2mt\src\cmsio0.c" /> + <ClCompile Include="..\lcms2mt\src\cmsio1.c" /> + <ClCompile Include="..\lcms2mt\src\cmslut.c" /> + <ClCompile Include="..\lcms2mt\src\cmsmd5.c" /> + <ClCompile Include="..\lcms2mt\src\cmsmtrx.c" /> + <ClCompile Include="..\lcms2mt\src\cmsnamed.c" /> + <ClCompile Include="..\lcms2mt\src\cmsopt.c" /> + <ClCompile Include="..\lcms2mt\src\cmspack.c" /> + <ClCompile Include="..\lcms2mt\src\cmspcs.c" /> + <ClCompile Include="..\lcms2mt\src\cmsplugin.c" /> + <ClCompile Include="..\lcms2mt\src\cmsps2.c" /> + <ClCompile Include="..\lcms2mt\src\cmssamp.c" /> + <ClCompile Include="..\lcms2mt\src\cmssm.c" /> + <ClCompile Include="..\lcms2mt\src\cmstypes.c" /> + <ClCompile Include="..\lcms2mt\src\cmsvirt.c" /> + <ClCompile Include="..\lcms2mt\src\cmswtpnt.c" /> + <ClCompile Include="..\lcms2mt\src\cmsxform.c" /> + <ClCompile Include="..\libpng\png.c" /> + <ClCompile Include="..\libpng\pngerror.c" /> + <ClCompile Include="..\libpng\pngget.c" /> + <ClCompile Include="..\libpng\pngmem.c" /> + <ClCompile Include="..\libpng\pngpread.c" /> + <ClCompile Include="..\libpng\pngread.c" /> + <ClCompile Include="..\libpng\pngrio.c" /> + <ClCompile Include="..\libpng\pngrtran.c" /> + <ClCompile Include="..\libpng\pngrutil.c" /> + <ClCompile Include="..\libpng\pngset.c" /> + <ClCompile Include="..\libpng\pngtrans.c" /> + <ClCompile Include="..\libpng\pngwio.c" /> + <ClCompile Include="..\libpng\pngwrite.c" /> + <ClCompile Include="..\libpng\pngwtran.c" /> + <ClCompile Include="..\libpng\pngwutil.c" /> + <ClCompile Include="..\tiff\libtiff\tif_aux.c" /> + <ClCompile Include="..\tiff\libtiff\tif_close.c" /> + <ClCompile Include="..\tiff\libtiff\tif_codec.c" /> + <ClCompile Include="..\tiff\libtiff\tif_color.c" /> + <ClCompile Include="..\tiff\libtiff\tif_compress.c" /> + <ClCompile Include="..\tiff\libtiff\tif_dir.c" /> + <ClCompile Include="..\tiff\libtiff\tif_dirinfo.c" /> + <ClCompile Include="..\tiff\libtiff\tif_dirread.c" /> + <ClCompile Include="..\tiff\libtiff\tif_dirwrite.c" /> + <ClCompile Include="..\tiff\libtiff\tif_dumpmode.c" /> + <ClCompile Include="..\tiff\libtiff\tif_error.c" /> + <ClCompile Include="..\tiff\libtiff\tif_extension.c" /> + <ClCompile Include="..\tiff\libtiff\tif_fax3.c" /> + <ClCompile Include="..\tiff\libtiff\tif_fax3sm.c" /> + <ClCompile Include="..\tiff\libtiff\tif_flush.c" /> + <ClCompile Include="..\tiff\libtiff\tif_getimage.c" /> + <ClCompile Include="..\tiff\libtiff\tif_jbig.c" /> + <ClCompile Include="..\tiff\libtiff\tif_jpeg.c" /> + <ClCompile Include="..\tiff\libtiff\tif_jpeg_12.c" /> + <ClCompile Include="..\tiff\libtiff\tif_luv.c" /> + <ClCompile Include="..\tiff\libtiff\tif_lzma.c" /> + <ClCompile Include="..\tiff\libtiff\tif_lzw.c" /> + <ClCompile Include="..\tiff\libtiff\tif_next.c" /> + <ClCompile Include="..\tiff\libtiff\tif_ojpeg.c" /> + <ClCompile Include="..\tiff\libtiff\tif_open.c" /> + <ClCompile Include="..\tiff\libtiff\tif_packbits.c" /> + <ClCompile Include="..\tiff\libtiff\tif_pixarlog.c" /> + <ClCompile Include="..\tiff\libtiff\tif_predict.c" /> + <ClCompile Include="..\tiff\libtiff\tif_print.c" /> + <ClCompile Include="..\tiff\libtiff\tif_read.c" /> + <ClCompile Include="..\tiff\libtiff\tif_strip.c" /> + <ClCompile Include="..\tiff\libtiff\tif_swab.c" /> + <ClCompile Include="..\tiff\libtiff\tif_thunder.c" /> + <ClCompile Include="..\tiff\libtiff\tif_tile.c" /> + <ClCompile Include="..\tiff\libtiff\tif_version.c" /> + <ClCompile Include="..\tiff\libtiff\tif_warning.c" /> + <ClCompile Include="..\tiff\libtiff\tif_webp.c" /> + <ClCompile Include="..\tiff\libtiff\tif_win32.c" /> + <ClCompile Include="..\tiff\libtiff\tif_write.c" /> + <ClCompile Include="..\tiff\libtiff\tif_zip.c" /> + <ClCompile Include="..\tiff\libtiff\tif_zstd.c" /> + <ClCompile Include="..\zlib\adler32.c" /> + <ClCompile Include="..\zlib\compress.c" /> + <ClCompile Include="..\zlib\crc32.c" /> + <ClCompile Include="..\zlib\deflate.c" /> + <ClCompile Include="..\zlib\infback.c" /> + <ClCompile Include="..\zlib\inffast.c" /> + <ClCompile Include="..\zlib\inflate.c" /> + <ClCompile Include="..\zlib\inftrees.c" /> + <ClCompile Include="..\zlib\trees.c" /> + <ClCompile Include="..\zlib\uncompr.c" /> + <ClCompile Include="..\zlib\zutil.c" /> + <ClCompile Include="bmpcmp.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\lcms2mt\include\lcms2mt.h" /> + <ClInclude Include="..\lcms2mt\include\lcms2mt_plugin.h" /> + <ClInclude Include="..\lcms2mt\src\extra_xform.h" /> + <ClInclude Include="..\lcms2mt\src\lcms2_internal.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/toolbin/build_bmpcmp.sh b/toolbin/build_bmpcmp.sh new file mode 100644 index 00000000..c64b0e50 --- /dev/null +++ b/toolbin/build_bmpcmp.sh @@ -0,0 +1,116 @@ +# set to location of ghostpdl +export baseDirectory=~/Artifex + +# First configure tiff not to use jpeg, jbig, lzma +cd $baseDirectory/ghostpdl/tiff +./configure --disable-jpeg --disable-old-jpeg --disable-jbig --disable-lzma +mv $baseDirectory/ghostpdl/tiff/libtiff/tif_config.h $baseDirectory/ghostpdl/toolbin + +# Also set up configure for png +# Just use pre-built. Had issues getting this setup +cp $baseDirectory/ghostpdl/libpng/scripts/pnglibconf.h.prebuilt $baseDirectory/ghostpdl/toolbin/pnglibconf.h + +cc -I$baseDirectory/ghostpdl/toolbin \ +-I$baseDirectory/ghostpdl/libpng \ +-I$baseDirectory/ghostpdl/tiff/libtiff \ +-I$baseDirectory/ghostpdl/zlib \ +-I$baseDirectory/ghostpdl/lcms2mt/include \ +-o bmpcmp -DHAVE_LIBPNG -DHAVE_LIBTIFF -DCOLOR_MANAGED \ +-UOJEPG_SUPPORT -UJPEG_SUPPORT \ + $baseDirectory/ghostpdl/toolbin/bmpcmp.c \ + $baseDirectory/ghostpdl/libpng/png.c \ + $baseDirectory/ghostpdl/libpng/pngerror.c \ + $baseDirectory/ghostpdl/libpng/pngget.c \ + $baseDirectory/ghostpdl/libpng/pngmem.c \ + $baseDirectory/ghostpdl/libpng/pngpread.c \ + $baseDirectory/ghostpdl/libpng/pngread.c \ + $baseDirectory/ghostpdl/libpng/pngrio.c \ + $baseDirectory/ghostpdl/libpng/pngrtran.c \ + $baseDirectory/ghostpdl/libpng/pngrutil.c \ + $baseDirectory/ghostpdl/libpng/pngset.c \ + $baseDirectory/ghostpdl/libpng/pngtrans.c \ + $baseDirectory/ghostpdl/libpng/pngwio.c \ + $baseDirectory/ghostpdl/libpng/pngwrite.c \ + $baseDirectory/ghostpdl/libpng/pngwtran.c \ + $baseDirectory/ghostpdl/libpng/pngwutil.c \ + $baseDirectory/ghostpdl/zlib/adler32.c \ + $baseDirectory/ghostpdl/zlib/crc32.c \ + $baseDirectory/ghostpdl/zlib/infback.c \ + $baseDirectory/ghostpdl/zlib/inflate.c \ + $baseDirectory/ghostpdl/zlib/uncompr.c \ + $baseDirectory/ghostpdl/zlib/compress.c \ + $baseDirectory/ghostpdl/zlib/deflate.c \ + $baseDirectory/ghostpdl/zlib/inffast.c \ + $baseDirectory/ghostpdl/zlib/inftrees.c \ + $baseDirectory/ghostpdl/zlib/trees.c \ + $baseDirectory/ghostpdl/zlib/zutil.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_aux.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_close.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_codec.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_color.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_compress.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_dir.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_dirinfo.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_dirread.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_dirwrite.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_dumpmode.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_error.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_extension.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_fax3.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_fax3sm.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_flush.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_getimage.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_jbig.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_jpeg.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_jpeg_12.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_luv.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_lzma.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_lzw.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_next.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_ojpeg.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_open.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_packbits.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_pixarlog.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_predict.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_print.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_read.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_strip.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_swab.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_thunder.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_tile.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_unix.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_version.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_warning.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_webp.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_write.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_zip.c \ + $baseDirectory/ghostpdl/tiff/libtiff/tif_zstd.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsalpha.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmscam02.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmscgats.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmscnvrt.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmserr.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsgamma.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsgmt.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmshalf.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsintrp.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsio0.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsio1.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmslut.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsmd5.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsmtrx.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsnamed.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsopt.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmspack.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmspcs.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsplugin.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsps2.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmssamp.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmssm.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmstypes.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsvirt.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmswtpnt.c \ + $baseDirectory/ghostpdl/lcms2mt/src/cmsxform.c \ + -lm 2>&1 -o $baseDirectory/ghostpdl/toolbin/bmpcmp + +# clean up tiff directory so gs still builds diff --git a/toolbin/color/icc_creator/ICC_Creator/CIELAB.h b/toolbin/color/icc_creator/ICC_Creator/CIELAB.h index 02b3caef..660f8939 100644 --- a/toolbin/color/icc_creator/ICC_Creator/CIELAB.h +++ b/toolbin/color/icc_creator/ICC_Creator/CIELAB.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.cpp b/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.cpp index 18fa81c7..a981b03e 100644 --- a/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.cpp +++ b/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.h b/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.h index c7d76044..a9c79b8e 100644 --- a/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.h +++ b/toolbin/color/icc_creator/ICC_Creator/ICC_Creator.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.cpp b/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.cpp index 1945f72f..b943180b 100644 --- a/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.cpp +++ b/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.h b/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.h index 22da9632..0b73d1aa 100644 --- a/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.h +++ b/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/ICC_Creator/icc_create.cpp b/toolbin/color/icc_creator/ICC_Creator/icc_create.cpp index ccc42a0d..e9f2bc5d 100644 --- a/toolbin/color/icc_creator/ICC_Creator/icc_create.cpp +++ b/toolbin/color/icc_creator/ICC_Creator/icc_create.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/ICC_Creator/icc_create.h b/toolbin/color/icc_creator/ICC_Creator/icc_create.h index dbd9ebf8..949bad6b 100644 --- a/toolbin/color/icc_creator/ICC_Creator/icc_create.h +++ b/toolbin/color/icc_creator/ICC_Creator/icc_create.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/color/icc_creator/README.txt b/toolbin/color/icc_creator/README.txt index c1cacdb8..bc236d05 100644 --- a/toolbin/color/icc_creator/README.txt +++ b/toolbin/color/icc_creator/README.txt @@ -1,4 +1,4 @@ - Copyright (C) 2001-2019 Artifex Software, Inc. + Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/encs2c.ps b/toolbin/encs2c.ps index 008b5490..f734b603 100644 --- a/toolbin/encs2c.ps +++ b/toolbin/encs2c.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2019 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -314,7 +314,7 @@ estrs readonly pop } loop pop def % Write the initial boilerplate. -(/* Copyright (C) 2001-2019 Artifex Software, Inc.) = +(/* Copyright (C) 2001-2020 Artifex Software, Inc.) = ( All Rights Reserved.) = ( ) = ( This software is provided AS-IS with no warranty, either express or) = diff --git a/toolbin/errlist.tcl b/toolbin/errlist.tcl index cd028e9d..2df10aa7 100755 --- a/toolbin/errlist.tcl +++ b/toolbin/errlist.tcl @@ -2,7 +2,7 @@ # hack to restart using tclsh \ exec tclsh "$0" "$@" -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/extractFonts.ps b/toolbin/extractFonts.ps index 224abe9f..5234e498 100644 --- a/toolbin/extractFonts.ps +++ b/toolbin/extractFonts.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2019 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/extractICCprofiles.ps b/toolbin/extractICCprofiles.ps index 36760cc5..9781c532 100644 --- a/toolbin/extractICCprofiles.ps +++ b/toolbin/extractICCprofiles.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2019 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/gen_ldf_jb2.py b/toolbin/gen_ldf_jb2.py index 67de170a..fe7f1358 100644 --- a/toolbin/gen_ldf_jb2.py +++ b/toolbin/gen_ldf_jb2.py @@ -1,5 +1,5 @@ #!/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/genfontmap.ps b/toolbin/genfontmap.ps index 565dcc74..ee013914 100644 --- a/toolbin/genfontmap.ps +++ b/toolbin/genfontmap.ps @@ -1,5 +1,5 @@ %!PS -% Copyright (C) 2001-2019 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/gitlog2changelog.py b/toolbin/gitlog2changelog.py index cea6f9fe..2b464253 100755 --- a/toolbin/gitlog2changelog.py +++ b/toolbin/gitlog2changelog.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or @@ -19,10 +19,6 @@ import os import sys -import string -import datetime -import time -import codecs argc = len(sys.argv) if argc < 3: diff --git a/toolbin/gsmake.tcl b/toolbin/gsmake.tcl index a74e45f5..9deb44f0 100755 --- a/toolbin/gsmake.tcl +++ b/toolbin/gsmake.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/halftone/ETS/ipview.html b/toolbin/halftone/ETS/ipview.html index 97be637b..cfcc1b0e 100644 --- a/toolbin/halftone/ETS/ipview.html +++ b/toolbin/halftone/ETS/ipview.html @@ -43,7 +43,7 @@ imageDataBlock.prototype.updateImage = function() var x, y, z; var R, G, B; var p = this.pos; - var canvas = this.canvas.getContext("2d") + var canvas = this.canvas.getContext("2d"); var id = canvas.getImageData(0, 0, w, h); var q = 0; @@ -85,7 +85,7 @@ imageDataBlock.prototype.updateImage = function() else { var fwd = w*h; - var back = w*h*d-1 + var back = w*h*d-1; for (y = h; y > 0; y--) { for (x = w; x > 0; x--) @@ -241,9 +241,6 @@ imageDataBlock.prototype.readPAM = function () this.planes[p].k = parseFloat(line); } } - else if (line.substring(0, 1) == "#") - { - } else if (line.substring(0, 6) == "ENDHDR") break; else @@ -335,6 +332,7 @@ function imageView(file, event) fixdiv.appendChild(document.createElement('br')); var form = document.createElement('form'); fixdiv.appendChild(form); + var i; for (i=0; i < data.depth; i++) { var span = document.createElement('span'); diff --git a/toolbin/halftone/gen_ordered/gen_ordered_main.c b/toolbin/halftone/gen_ordered/gen_ordered_main.c index 6ff3ee7d..e792ebdc 100644 --- a/toolbin/halftone/gen_ordered/gen_ordered_main.c +++ b/toolbin/halftone/gen_ordered/gen_ordered_main.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/halftone/gen_stochastic/gen_stochastic.c b/toolbin/halftone/gen_stochastic/gen_stochastic.c index 23fd2424..3b05d2ef 100644 --- a/toolbin/halftone/gen_stochastic/gen_stochastic.c +++ b/toolbin/halftone/gen_stochastic/gen_stochastic.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/headercompile.pl b/toolbin/headercompile.pl index 2bff2475..2b3a95b3 100755 --- a/toolbin/headercompile.pl +++ b/toolbin/headercompile.pl @@ -448,7 +448,7 @@ rewrite_make("base/tiff.mak"); rewrite_make("base/winlib.mak"); rewrite_make("psi/int.mak"); rewrite_make("psi/winint.mak"); -rewrite_make("devices/contrib.mak"); +rewrite_make("devices/dcontrib.mak"); rewrite_make("devices/devs.mak"); rewrite_make("gpdl/pspcl6_gcc.mak"); rewrite_make("pcl/pl/pl.mak"); diff --git a/toolbin/headers.tcl b/toolbin/headers.tcl index 18eca404..c1297b5a 100755 --- a/toolbin/headers.tcl +++ b/toolbin/headers.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/jpxtopdf.c b/toolbin/jpxtopdf.c index 12929619..bc3691db 100644 --- a/toolbin/jpxtopdf.c +++ b/toolbin/jpxtopdf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/leaks.tcl b/toolbin/leaks.tcl index eccbbdf8..7b9c5a11 100755 --- a/toolbin/leaks.tcl +++ b/toolbin/leaks.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/localcluster/clusterpush.pl b/toolbin/localcluster/clusterpush.pl index c2c3555e..e4db5331 100755 --- a/toolbin/localcluster/clusterpush.pl +++ b/toolbin/localcluster/clusterpush.pl @@ -7,7 +7,7 @@ use Data::Dumper; my $verbose=0; -# bmpcmp usage: [gs] [pcl] [xps] [mupdf] [mujstest] [bmpcmp] [arm] [lowres] [highres] [32] [pdfwrite] [ps2write] [xpswrite] [nopdfwrite] [relaxtimeout] [extended] [smoke] [cull] [avx2] [$user] | abort +# bmpcmp usage: [gs] [pcl] [xps] [mupdf] [mujstest] [murun] [mudrawpy] [bmpcmp] [arm] [lowres] [highres] [32] [pdfwrite] [ps2write] [xpswrite] [nopdfwrite] [relaxtimeout] [extended] [smoke] [cull] [avx2] [$user] | abort @@ -22,7 +22,9 @@ my %products=('abort' =>1, 'gpdf'=>1, 'gpdl'=>1, 'mupdf'=>1, - 'mujstest'=>1); + 'mujstest'=>1, + 'murun'=>1, + 'mudrawpy'=>1); my $user; my $product=""; @@ -80,6 +82,8 @@ while ($t1=shift) { $relaxTimeout="relaxTimeout"; } elsif ($t1=~m/^-/ || $t1=~m/^\d/) { $command.=$t1.' '; + } elsif ($t1 =~ m/ifilter=.*/) { + $filters.=$t1.' '; } elsif ($t1 =~ m/filter=.*/) { $filters.=$t1.' '; } elsif ($t1 =~ m/extras=.*/) { @@ -205,7 +209,7 @@ my $cmd="rsync -avxcz ". " --exclude membin --exclude memobj --exclude membin64 --exclude memobj64". " --exclude profbin --exclude profobj --exclude profbin64 --exclude profobj64". " --exclude sanbin --exclude sanobj --exclude sanbin64 --exclude sanobj64". -" --exclude sobin --exclude soobj --exclude debugbin". +" --exclude sobin --exclude soobj --exclude debugbin --exclude sodebugbin --exclude sodebugobj". " --exclude ufst --exclude ufst-obj --exclude ufst-debugobj". " --exclude '*-bin' --exclude '*-obj'". " --exclude config.log --exclude .png". @@ -213,6 +217,17 @@ my $cmd="rsync -avxcz ". " --exclude .tif --exclude .bmp". " --exclude debug --exclude release --exclude generated --exclude sanitize". # we cannot just exclude build, since tiff/build/Makefile.in, etc. is needed " --exclude tiff-config". +" --exclude 'shared-*'". + +# Exclude files generated by scripts/mupdfwrap.py: +" --exclude mupdfwrap_ref". +" --exclude platform/c++". +" --exclude platform/python". +" --exclude include/html". +" --exclude include/latex". + +" --exclude /build/". + # " --exclude Makefile". We can't just exclude Makefile, since the MuPDF Makefile is not a derived file. " -e \"$ssh\" ". " .". diff --git a/toolbin/makehist.tcl b/toolbin/makehist.tcl index 67542da1..8d2e2a6a 100755 --- a/toolbin/makehist.tcl +++ b/toolbin/makehist.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/memory.py b/toolbin/memory.py index f32957e1..879b868f 100755 --- a/toolbin/memory.py +++ b/toolbin/memory.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/ocheck.py b/toolbin/ocheck.py index 5fbfd407..fc4a80dd 100755 --- a/toolbin/ocheck.py +++ b/toolbin/ocheck.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or @@ -251,9 +251,9 @@ def forfts(args, defs, refs, proc, verbose): fmods = dict([(m, 1) for m in fmods]) if tm or not ts: # neither tm nor ts = all tm = re.compile(tm) - tmods = dict([(m, 1) for m in defmods if tm.match(m)]) + #tmods = dict([(m, 1) for m in defmods if tm.match(m)]) else: - tmods = None + #tmods = None # ****** fs IS BOGUS, USES ENTIRE MODULE ****** if fs: fs = re.compile(fs) @@ -306,7 +306,9 @@ def main(argv): cwd = args.pop(0) else: cwd = '' - if len(args) < 1: return usage() + if len(args) < 1: + usage() + return verbose = False # Read the ld script and each file's symbol table. ldscript = args.pop(0) @@ -381,7 +383,8 @@ def main(argv): elif arg == '--verbose': verbose = True else: - return usage() + usage() + return if __name__ == '__main__': sys.exit(main(sys.argv) or 0) diff --git a/toolbin/pre.tcl b/toolbin/pre.tcl index 83241a9e..7276e0b2 100755 --- a/toolbin/pre.tcl +++ b/toolbin/pre.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/precheck.tcl b/toolbin/precheck.tcl index 9e934afe..c852e0c3 100755 --- a/toolbin/precheck.tcl +++ b/toolbin/precheck.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/split_changelog.py b/toolbin/split_changelog.py index e23491b9..bf55f6c3 100755 --- a/toolbin/split_changelog.py +++ b/toolbin/split_changelog.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/squeeze2text.py b/toolbin/squeeze2text.py index 0f533d20..685044f0 100755 --- a/toolbin/squeeze2text.py +++ b/toolbin/squeeze2text.py @@ -58,6 +58,7 @@ if __name__ == '__main__': # characters. f = io.TextIOWrapper( sys.stdin.buffer, encoding='latin_1') progress_n_next = 0 + memento_n = None def print_progress(): print( 'memento_n=%s. num_segv=%s num_leak=%s' % ( diff --git a/toolbin/suite.tcl b/toolbin/suite.tcl index 474b36a0..81d90847 100755 --- a/toolbin/suite.tcl +++ b/toolbin/suite.tcl @@ -1,6 +1,6 @@ #!/usr/bin/tclsh -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/build_revision.py b/toolbin/tests/build_revision.py index 2edfcc59..d02eef36 100755 --- a/toolbin/tests/build_revision.py +++ b/toolbin/tests/build_revision.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/check_all.py b/toolbin/tests/check_all.py index 6a04fe69..6411579a 100755 --- a/toolbin/tests/check_all.py +++ b/toolbin/tests/check_all.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/check_comments.py b/toolbin/tests/check_comments.py index a5a04367..abe8bdbd 100755 --- a/toolbin/tests/check_comments.py +++ b/toolbin/tests/check_comments.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/check_dirs.py b/toolbin/tests/check_dirs.py index 62c13fcc..58f0d12f 100755 --- a/toolbin/tests/check_dirs.py +++ b/toolbin/tests/check_dirs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/check_docrefs.py b/toolbin/tests/check_docrefs.py index 6daee79c..cc5ae2ec 100755 --- a/toolbin/tests/check_docrefs.py +++ b/toolbin/tests/check_docrefs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/cmpi.py b/toolbin/tests/cmpi.py index f7904aff..38a275da 100644 --- a/toolbin/tests/cmpi.py +++ b/toolbin/tests/cmpi.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/compare_checksumdb.py b/toolbin/tests/compare_checksumdb.py index 58935fd8..59330928 100755 --- a/toolbin/tests/compare_checksumdb.py +++ b/toolbin/tests/compare_checksumdb.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/compare_checksums.py b/toolbin/tests/compare_checksums.py index 88f0b4c4..b2f3d4f8 100755 --- a/toolbin/tests/compare_checksums.py +++ b/toolbin/tests/compare_checksums.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/dump_checksum.py b/toolbin/tests/dump_checksum.py index 09966813..f009666b 100755 --- a/toolbin/tests/dump_checksum.py +++ b/toolbin/tests/dump_checksum.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/dump_checksum_plus.py b/toolbin/tests/dump_checksum_plus.py index ba496d3f..7a31a56b 100755 --- a/toolbin/tests/dump_checksum_plus.py +++ b/toolbin/tests/dump_checksum_plus.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/dump_checksum_raw.py b/toolbin/tests/dump_checksum_raw.py index 5dec7c03..1a647156 100755 --- a/toolbin/tests/dump_checksum_raw.py +++ b/toolbin/tests/dump_checksum_raw.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/fuzzy.c b/toolbin/tests/fuzzy.c index b1112a79..29694f0a 100644 --- a/toolbin/tests/fuzzy.c +++ b/toolbin/tests/fuzzy.c @@ -1,5 +1,20 @@ +/* Copyright (C) 2001-2020 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, + modified or distributed except as expressly authorized under the terms + of the license contained in the file LICENSE in this distribution. + + Refer to licensing information at http://www.artifex.com or contact + Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, + CA 94945, U.S.A., +1(415)492-9861, for further information. +*/ + /** - * Fuzzy comparison utility. Copyright 2001-2018 Artifex Software, Inc. + * Fuzzy comparison utility. **/ #include <stdio.h> diff --git a/toolbin/tests/get_baseline_log.py b/toolbin/tests/get_baseline_log.py index 00270174..230942b1 100755 --- a/toolbin/tests/get_baseline_log.py +++ b/toolbin/tests/get_baseline_log.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/get_baselines.py b/toolbin/tests/get_baselines.py index 33e3b70f..7333821f 100755 --- a/toolbin/tests/get_baselines.py +++ b/toolbin/tests/get_baselines.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gscheck_all.py b/toolbin/tests/gscheck_all.py index 632580ad..2fe3fd8a 100755 --- a/toolbin/tests/gscheck_all.py +++ b/toolbin/tests/gscheck_all.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gscheck_fuzzypdf.py b/toolbin/tests/gscheck_fuzzypdf.py index ff987e86..af312cb8 100755 --- a/toolbin/tests/gscheck_fuzzypdf.py +++ b/toolbin/tests/gscheck_fuzzypdf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gscheck_pdfwrite.py b/toolbin/tests/gscheck_pdfwrite.py index f5a68f5e..bc841554 100755 --- a/toolbin/tests/gscheck_pdfwrite.py +++ b/toolbin/tests/gscheck_pdfwrite.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gscheck_raster.py b/toolbin/tests/gscheck_raster.py index e909020a..78fe4da8 100755 --- a/toolbin/tests/gscheck_raster.py +++ b/toolbin/tests/gscheck_raster.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gscheck_testfiles.py b/toolbin/tests/gscheck_testfiles.py index c3505726..9baa64b3 100755 --- a/toolbin/tests/gscheck_testfiles.py +++ b/toolbin/tests/gscheck_testfiles.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gsconf.py b/toolbin/tests/gsconf.py index 2e507cce..a2451969 100644 --- a/toolbin/tests/gsconf.py +++ b/toolbin/tests/gsconf.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gsparamsets.py b/toolbin/tests/gsparamsets.py index 6c4f5701..b278537d 100644 --- a/toolbin/tests/gsparamsets.py +++ b/toolbin/tests/gsparamsets.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gssum.py b/toolbin/tests/gssum.py index ae8c3e83..0867fd48 100644 --- a/toolbin/tests/gssum.py +++ b/toolbin/tests/gssum.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gstestgs.py b/toolbin/tests/gstestgs.py index 74748c61..fd8b2fcc 100644 --- a/toolbin/tests/gstestgs.py +++ b/toolbin/tests/gstestgs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gstestutils.py b/toolbin/tests/gstestutils.py index bdb0ad5c..0c4fa168 100644 --- a/toolbin/tests/gstestutils.py +++ b/toolbin/tests/gstestutils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/gsutil.py b/toolbin/tests/gsutil.py index b0db8d0b..55f47772 100644 --- a/toolbin/tests/gsutil.py +++ b/toolbin/tests/gsutil.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/make_baselinedb.py b/toolbin/tests/make_baselinedb.py index 96251d95..6e984a57 100755 --- a/toolbin/tests/make_baselinedb.py +++ b/toolbin/tests/make_baselinedb.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/make_testdb.py b/toolbin/tests/make_testdb.py index 0c56f7ca..70f568d3 100755 --- a/toolbin/tests/make_testdb.py +++ b/toolbin/tests/make_testdb.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/make_two_pdfversions b/toolbin/tests/make_two_pdfversions index e02dc616..0aeb2db4 100755 --- a/toolbin/tests/make_two_pdfversions +++ b/toolbin/tests/make_two_pdfversions @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/make_two_versions b/toolbin/tests/make_two_versions index 938295d6..70fe5fb2 100755 --- a/toolbin/tests/make_two_versions +++ b/toolbin/tests/make_two_versions @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/myoptparse.py b/toolbin/tests/myoptparse.py index 448b99ba..50b37ef3 100755 --- a/toolbin/tests/myoptparse.py +++ b/toolbin/tests/myoptparse.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/rasterdb.py b/toolbin/tests/rasterdb.py index e3f6bac9..6e5485a4 100644 --- a/toolbin/tests/rasterdb.py +++ b/toolbin/tests/rasterdb.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/revert_baseline b/toolbin/tests/revert_baseline index c65ed92f..fb3b87b2 100755 --- a/toolbin/tests/revert_baseline +++ b/toolbin/tests/revert_baseline @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/revert_pdfbaseline b/toolbin/tests/revert_pdfbaseline index d1c28f91..833bb770 100755 --- a/toolbin/tests/revert_pdfbaseline +++ b/toolbin/tests/revert_pdfbaseline @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/run_nightly.py b/toolbin/tests/run_nightly.py index ddce9681..65ea07b2 100755 --- a/toolbin/tests/run_nightly.py +++ b/toolbin/tests/run_nightly.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/run_parallel b/toolbin/tests/run_parallel index e9f3562c..0360ca67 100755 --- a/toolbin/tests/run_parallel +++ b/toolbin/tests/run_parallel @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/run_regression.py b/toolbin/tests/run_regression.py index 2344a2a8..96a5af77 100755 --- a/toolbin/tests/run_regression.py +++ b/toolbin/tests/run_regression.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/testdiff.py b/toolbin/tests/testdiff.py index 0538115d..d0f6dc4f 100755 --- a/toolbin/tests/testdiff.py +++ b/toolbin/tests/testdiff.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/update_baseline.py b/toolbin/tests/update_baseline.py index 6638717f..c6e0926b 100755 --- a/toolbin/tests/update_baseline.py +++ b/toolbin/tests/update_baseline.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tests/update_specific b/toolbin/tests/update_specific index 4beabdb0..0a90c339 100755 --- a/toolbin/tests/update_specific +++ b/toolbin/tests/update_specific @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- Mode: python -*- -## Copyright (C) 2001-2019 Artifex Software, Inc. +## Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or diff --git a/toolbin/tmake.tcl b/toolbin/tmake.tcl index 744c8c45..e14dc908 100755 --- a/toolbin/tmake.tcl +++ b/toolbin/tmake.tcl @@ -2,7 +2,7 @@ # hack to restart using tclsh \ exec tclsh "$0" "$@" -# Copyright (C) 2001-2019 Artifex Software, Inc. +# Copyright (C) 2001-2020 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or |