Update 3rd party library binaries for MSVC 2019 and update to libtiff 4.2.0 w/ customizations

This commit is contained in:
manongjohn 2022-08-26 07:56:49 -04:00
parent 7a440ac58e
commit 7317b1a174
689 changed files with 52594 additions and 26618 deletions

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1949782745964dd7bfd45e9bb3e72f083f97b43cc9602e98b3ea7bbe9b959d19
size 983682

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7580d8a7fb9479a24e97372d98b7ebb5b3684590588a8a578a282d3a6dc95395
size 1183242

View file

@ -0,0 +1,189 @@
# This file is included from the top-level CMakeLists.txt. We just store it
# here to avoid cluttering up that file.
set(PKGNAME ${CMAKE_PROJECT_NAME} CACHE STRING
"Distribution package name (default: ${CMAKE_PROJECT_NAME})")
set(PKGVENDOR "The ${CMAKE_PROJECT_NAME} Project" CACHE STRING
"Vendor name to be included in distribution package descriptions (default: The ${CMAKE_PROJECT_NAME} Project)")
set(PKGURL "http://www.${CMAKE_PROJECT_NAME}.org" CACHE STRING
"URL of project web site to be included in distribution package descriptions (default: http://www.${CMAKE_PROJECT_NAME}.org)")
set(PKGEMAIL "information@${CMAKE_PROJECT_NAME}.org" CACHE STRING
"E-mail of project maintainer to be included in distribution package descriptions (default: information@${CMAKE_PROJECT_NAME}.org")
set(PKGID "com.${CMAKE_PROJECT_NAME}.${PKGNAME}" CACHE STRING
"Globally unique package identifier (reverse DNS notation) (default: com.${CMAKE_PROJECT_NAME}.${PKGNAME})")
###############################################################################
# Linux RPM and DEB
###############################################################################
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(RPMARCH ${CMAKE_SYSTEM_PROCESSOR})
if(CPU_TYPE STREQUAL "x86_64")
set(DEBARCH amd64)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7*")
set(RPMARCH armv7hl)
set(DEBARCH armhf)
elseif(CPU_TYPE STREQUAL "arm64")
set(DEBARCH ${CPU_TYPE})
elseif(CPU_TYPE STREQUAL "arm")
if(CMAKE_C_COMPILER MATCHES "gnueabihf")
set(RPMARCH armv7hl)
set(DEBARCH armhf)
else()
set(RPMARCH armel)
set(DEBARCH armel)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "ppc64le")
set(DEBARCH ppc64el)
elseif(CPU_TYPE STREQUAL "powerpc" AND BITS EQUAL 32)
set(RPMARCH ppc)
set(DEBARCH ppc)
else()
set(DEBARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
message(STATUS "RPM architecture = ${RPMARCH}, DEB architecture = ${DEBARCH}")
# Re-set CMAKE_POSITION_INDEPENDENT_CODE so that the RPM spec file works
# properly
boolean_number(CMAKE_POSITION_INDEPENDENT_CODE)
configure_file(release/makerpm.in pkgscripts/makerpm)
configure_file(release/rpm.spec.in pkgscripts/rpm.spec @ONLY)
add_custom_target(rpm pkgscripts/makerpm
SOURCES pkgscripts/makerpm)
configure_file(release/makesrpm.in pkgscripts/makesrpm)
add_custom_target(srpm pkgscripts/makesrpm
SOURCES pkgscripts/makesrpm
DEPENDS dist)
configure_file(release/makedpkg.in pkgscripts/makedpkg)
configure_file(release/deb-control.in pkgscripts/deb-control)
add_custom_target(deb pkgscripts/makedpkg
SOURCES pkgscripts/makedpkg)
endif() # Linux
###############################################################################
# Windows installer (NullSoft Installer)
###############################################################################
if(WIN32)
if(MSVC)
set(INST_PLATFORM "Visual C++")
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
set(INST_REG_NAME ${CMAKE_PROJECT_NAME})
elseif(MINGW)
set(INST_PLATFORM GCC)
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc)
set(INST_REG_NAME ${CMAKE_PROJECT_NAME}-gcc)
set(INST_DEFS -DGCC)
endif()
if(BITS EQUAL 64)
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
set(INST_NAME ${INST_NAME}64)
set(INST_REG_NAME ${INST_REG_NAME}64)
set(INST_DEFS ${INST_DEFS} -DWIN64)
endif()
if(WITH_JAVA)
set(INST_DEFS ${INST_DEFS} -DJAVA)
endif()
if(MSVC_IDE)
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
else()
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
endif()
string(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX})
configure_file(release/installer.nsi.in installer.nsi @ONLY)
if(WITH_JAVA)
set(JAVA_DEPEND turbojpeg-java)
endif()
add_custom_target(installer
makensis -nocd ${INST_DEFS} installer.nsi
DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
SOURCES installer.nsi)
endif() # WIN32
###############################################################################
# Cygwin Package
###############################################################################
if(CYGWIN)
configure_file(release/makecygwinpkg.in pkgscripts/makecygwinpkg)
add_custom_target(cygwinpkg pkgscripts/makecygwinpkg)
endif() # CYGWIN
###############################################################################
# Mac DMG
###############################################################################
if(APPLE)
set(DEFAULT_OSX_32BIT_BUILD ${CMAKE_SOURCE_DIR}/osxx86)
set(OSX_32BIT_BUILD ${DEFAULT_OSX_32BIT_BUILD} CACHE PATH
"Directory containing 32-bit (i386) Mac build to include in universal binaries (default: ${DEFAULT_OSX_32BIT_BUILD})")
set(DEFAULT_IOS_ARMV7_BUILD ${CMAKE_SOURCE_DIR}/iosarmv7)
set(IOS_ARMV7_BUILD ${DEFAULT_IOS_ARMV7_BUILD} CACHE PATH
"Directory containing Armv7 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV7_BUILD})")
set(DEFAULT_IOS_ARMV7S_BUILD ${CMAKE_SOURCE_DIR}/iosarmv7s)
set(IOS_ARMV7S_BUILD ${DEFAULT_IOS_ARMV7S_BUILD} CACHE PATH
"Directory containing Armv7s iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV7S_BUILD})")
set(DEFAULT_IOS_ARMV8_BUILD ${CMAKE_SOURCE_DIR}/iosarmv8)
set(IOS_ARMV8_BUILD ${DEFAULT_IOS_ARMV8_BUILD} CACHE PATH
"Directory containing Armv8 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV8_BUILD})")
set(OSX_APP_CERT_NAME "" CACHE STRING
"Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.")
set(OSX_INST_CERT_NAME "" CACHE STRING
"Name of the Developer ID Installer certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo installer package. Leave this blank to generate an unsigned package.")
configure_file(release/makemacpkg.in pkgscripts/makemacpkg)
configure_file(release/Distribution.xml.in pkgscripts/Distribution.xml)
configure_file(release/uninstall.in pkgscripts/uninstall)
add_custom_target(dmg pkgscripts/makemacpkg
SOURCES pkgscripts/makemacpkg)
add_custom_target(udmg pkgscripts/makemacpkg universal
SOURCES pkgscripts/makemacpkg)
endif() # APPLE
###############################################################################
# Generic
###############################################################################
add_custom_target(dist
COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}-${VERSION}/ HEAD |
gzip > ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
configure_file(release/maketarball.in pkgscripts/maketarball)
add_custom_target(tarball pkgscripts/maketarball
SOURCES pkgscripts/maketarball)
configure_file(release/libjpeg.pc.in pkgscripts/libjpeg.pc @ONLY)
configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY)

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<title>@CMAKE_PROJECT_NAME@</title>
<welcome file="Welcome.rtf" />
<readme file="ReadMe.txt" />
<license file="License.rtf" />
<domains
enable_anywhere="false"
enable_currentUserHome="false"
enable_localSystem="true"
/>
<options customize="never" />
<choices-outline>
<line choice="default">
<line choice="@PKGID@"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="@PKGID@" visible="false">
<pkg-ref id="@PKGID@"/>
</choice>
<pkg-ref auth="root"
id="@PKGID@">@PKGNAME@.pkg</pkg-ref>
</installer-gui-script>

View file

@ -0,0 +1,20 @@
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\margl1440\margr1440\vieww9820\viewh8480\viewkind0
\deftab720
\pard\pardeftab720
\f0\fs24 \cf0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\
\
\pard\tx220\tx720\pardeftab720\li720\fi-720
\ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\
{\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\
{\listtext \'95 }Neither the name of the libjpeg-turbo Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\
\pard\pardeftab720\qc
\cf0 \
\pard\pardeftab720
\cf0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
}

View file

@ -0,0 +1,5 @@
libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and MIPS systems, as well as progressive JPEG compression on x86 and x86-64 systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface.
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.

View file

@ -0,0 +1,17 @@
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\ql\qnatural
\f0\fs24 \cf0 This installer will install the libjpeg-turbo SDK and run-time libraries onto your computer so that you can use libjpeg-turbo to build new applications or accelerate existing ones. To remove the libjpeg-turbo package, run\
\
\pard\pardeftab720\ql\qnatural
\f1 \cf0 /opt/libjpeg-turbo/bin/uninstall\
\pard\pardeftab720\ql\qnatural
\f0 \cf0 \
from the command line.\
}

View file

@ -0,0 +1,31 @@
Package: {__PKGNAME}
Version: @VERSION@-@BUILD@
Section: misc
Priority: optional
Architecture: {__ARCH}
Essential: no
Maintainer: @PKGVENDOR@ <@PKGEMAIL@>
Homepage: @PKGURL@
Installed-Size: {__SIZE}
Description: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs
libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate
baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and
MIPS systems, as well as progressive JPEG compression on x86 and x86-64
systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg,
all else being equal. On other types of systems, libjpeg-turbo can still
outperform libjpeg by a significant amount, by virtue of its highly-optimized
Huffman coding routines. In many cases, the performance of libjpeg-turbo
rivals that of proprietary high-speed JPEG codecs.
.
libjpeg-turbo implements both the traditional libjpeg API as well as the less
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
colorspace extensions that allow it to compress from/decompress to 32-bit and
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
interface.
.
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
VirtualGL projects made numerous enhancements to the codec in 2009, and in
early 2010, libjpeg-turbo spun off into an independent project, with the goal
of making high-speed JPEG compression/decompression technology available to a
broader range of users and developers.

View file

@ -0,0 +1,191 @@
!include x64.nsh
Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@"
OutFile "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe"
InstallDir "@INST_DIR@"
SetCompressor bzip2
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
!ifdef WIN64
${If} ${RunningX64}
${DisableX64FSRedirection}
${Endif}
!endif
SectionIn RO
!ifdef GCC
IfFileExists $SYSDIR/libturbojpeg.dll exists 0
!else
IfFileExists $SYSDIR/turbojpeg.dll exists 0
!endif
goto notexists
exists:
!ifdef GCC
MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ is already installed. Please uninstall it first."
!else
MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ or the TurboJPEG SDK is already installed. Please uninstall it first."
!endif
quit
notexists:
SetOutPath $SYSDIR
!ifdef GCC
File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.dll"
!else
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.dll"
!endif
SetOutPath $INSTDIR\bin
!ifdef GCC
File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.dll"
!else
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.dll"
!endif
!ifdef GCC
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg-@SO_MAJOR_VERSION@.dll"
!else
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg@SO_MAJOR_VERSION@.dll"
!endif
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}cjpeg.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}djpeg.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpegtran.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}tjbench.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe"
SetOutPath $INSTDIR\lib
!ifdef GCC
File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.dll.a"
File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.a"
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg.dll.a"
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg.a"
!else
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg-static.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg-static.lib"
!endif
SetOutPath $INSTDIR\lib\pkgconfig
File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libjpeg.pc"
File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libturbojpeg.pc"
!ifdef JAVA
SetOutPath $INSTDIR\classes
File "@CMAKE_CURRENT_BINARY_DIR@\java\turbojpeg.jar"
!endif
SetOutPath $INSTDIR\include
File "@CMAKE_CURRENT_BINARY_DIR@\jconfig.h"
File "@CMAKE_CURRENT_SOURCE_DIR@\jerror.h"
File "@CMAKE_CURRENT_SOURCE_DIR@\jmorecfg.h"
File "@CMAKE_CURRENT_SOURCE_DIR@\jpeglib.h"
File "@CMAKE_CURRENT_SOURCE_DIR@\turbojpeg.h"
SetOutPath $INSTDIR\doc
File "@CMAKE_CURRENT_SOURCE_DIR@\README.ijg"
File "@CMAKE_CURRENT_SOURCE_DIR@\README.md"
File "@CMAKE_CURRENT_SOURCE_DIR@\LICENSE.md"
File "@CMAKE_CURRENT_SOURCE_DIR@\example.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\libjpeg.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\structure.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\usage.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\wizard.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\tjexample.c"
File "@CMAKE_CURRENT_SOURCE_DIR@\java\TJExample.java"
!ifdef GCC
SetOutPath $INSTDIR\man\man1
File "@CMAKE_CURRENT_SOURCE_DIR@\cjpeg.1"
File "@CMAKE_CURRENT_SOURCE_DIR@\djpeg.1"
File "@CMAKE_CURRENT_SOURCE_DIR@\jpegtran.1"
File "@CMAKE_CURRENT_SOURCE_DIR@\rdjpgcom.1"
File "@CMAKE_CURRENT_SOURCE_DIR@\wrjpgcom.1"
!endif
WriteRegStr HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@" "Install_Dir" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoRepair" 1
WriteUninstaller "uninstall_@VERSION@.exe"
SectionEnd
Section "Uninstall"
!ifdef WIN64
${If} ${RunningX64}
${DisableX64FSRedirection}
${Endif}
!endif
SetShellVarContext all
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@"
DeleteRegKey HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@"
!ifdef GCC
Delete $INSTDIR\bin\libjpeg-@SO_MAJOR_VERSION@.dll
Delete $INSTDIR\bin\libturbojpeg.dll
Delete $SYSDIR\libturbojpeg.dll
Delete $INSTDIR\lib\libturbojpeg.dll.a
Delete $INSTDIR\lib\libturbojpeg.a
Delete $INSTDIR\lib\libjpeg.dll.a
Delete $INSTDIR\lib\libjpeg.a
!else
Delete $INSTDIR\bin\jpeg@SO_MAJOR_VERSION@.dll
Delete $INSTDIR\bin\turbojpeg.dll
Delete $SYSDIR\turbojpeg.dll
Delete $INSTDIR\lib\jpeg.lib
Delete $INSTDIR\lib\jpeg-static.lib
Delete $INSTDIR\lib\turbojpeg.lib
Delete $INSTDIR\lib\turbojpeg-static.lib
!endif
Delete $INSTDIR\lib\pkgconfig\libjpeg.pc
Delete $INSTDIR\lib\pkgconfig\libturbojpeg.pc
!ifdef JAVA
Delete $INSTDIR\classes\turbojpeg.jar
!endif
Delete $INSTDIR\bin\cjpeg.exe
Delete $INSTDIR\bin\djpeg.exe
Delete $INSTDIR\bin\jpegtran.exe
Delete $INSTDIR\bin\tjbench.exe
Delete $INSTDIR\bin\rdjpgcom.exe
Delete $INSTDIR\bin\wrjpgcom.exe
Delete $INSTDIR\include\jconfig.h
Delete $INSTDIR\include\jerror.h
Delete $INSTDIR\include\jmorecfg.h
Delete $INSTDIR\include\jpeglib.h
Delete $INSTDIR\include\turbojpeg.h
Delete $INSTDIR\uninstall_@VERSION@.exe
Delete $INSTDIR\doc\README.ijg
Delete $INSTDIR\doc\README.md
Delete $INSTDIR\doc\LICENSE.md
Delete $INSTDIR\doc\example.txt
Delete $INSTDIR\doc\libjpeg.txt
Delete $INSTDIR\doc\structure.txt
Delete $INSTDIR\doc\usage.txt
Delete $INSTDIR\doc\wizard.txt
Delete $INSTDIR\doc\tjexample.c
Delete $INSTDIR\doc\TJExample.java
!ifdef GCC
Delete $INSTDIR\man\man1\cjpeg.1
Delete $INSTDIR\man\man1\djpeg.1
Delete $INSTDIR\man\man1\jpegtran.1
Delete $INSTDIR\man\man1\rdjpgcom.1
Delete $INSTDIR\man\man1\wrjpgcom.1
!endif
RMDir "$INSTDIR\include"
RMDir "$INSTDIR\lib\pkgconfig"
RMDir "$INSTDIR\lib"
RMDir "$INSTDIR\doc"
!ifdef GCC
RMDir "$INSTDIR\man\man1"
RMDir "$INSTDIR\man"
!endif
!ifdef JAVA
RMDir "$INSTDIR\classes"
!endif
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR"
SectionEnd

View file

@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: libjpeg
Description: A SIMD-accelerated JPEG codec that provides the libjpeg API
Version: @VERSION@
Libs: -L${libdir} -ljpeg
Cflags: -I${includedir}

View file

@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: libturbojpeg
Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API
Version: @VERSION@
Libs: -L${libdir} -lturbojpeg
Cflags: -I${includedir}

View file

@ -0,0 +1,66 @@
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
rm -rf $TMPDIR
fi
}
safedirmove ()
{
if [ "$1" = "$2" ]; then
return 0
fi
if [ "$1" = "" -o ! -d "$1" ]; then
echo safedirmove: source dir $1 is not valid
return 1
fi
if [ "$2" = "" -o -e "$2" ]; then
echo safedirmove: dest dir $2 is not valid
return 1
fi
if [ "$3" = "" -o -e "$3" ]; then
echo safedirmove: tmp dir $3 is not valid
return 1
fi
mkdir -p $3
mv $1/* $3/
rmdir $1
mkdir -p $2
mv $3/* $2/
rmdir $3
return 0
}
PKGNAME=@PKGNAME@
VERSION=@VERSION@
BUILD=@BUILD@
PREFIX=@CMAKE_INSTALL_PREFIX@
DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@
LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@
umask 022
rm -f $PKGNAME-$VERSION-$BUILD.tar.bz2
TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX`
__PWD=`pwd`
make install DESTDIR=$TMPDIR/pkg
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then
safedirmove $TMPDIR/pkg$DOCDIR $TMPDIR/pkg/usr/share/doc/$PKGNAME-$VERSION $TMPDIR/__tmpdoc
ln -fs /usr/share/doc/$PKGNAME-$VERSION $TMPDIR/pkg$DOCDIR
fi
cd $TMPDIR/pkg
tar cfj ../$PKGNAME-$VERSION-$BUILD.tar.bz2 *
cd $__PWD
mv $TMPDIR/*.tar.bz2 .
exit 0

View file

@ -0,0 +1,121 @@
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
SUDO=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
$SUDO rm -rf $TMPDIR
fi
}
uid()
{
id | cut -f2 -d = | cut -f1 -d \(;
}
safedirmove ()
{
if [ "$1" = "$2" ]; then
return 0
fi
if [ "$1" = "" -o ! -d "$1" ]; then
echo safedirmove: source dir $1 is not valid
return 1
fi
if [ "$2" = "" -o -e "$2" ]; then
echo safedirmove: dest dir $2 is not valid
return 1
fi
if [ "$3" = "" -o -e "$3" ]; then
echo safedirmove: tmp dir $3 is not valid
return 1
fi
mkdir -p $3
mv $1/* $3/
rmdir $1
mkdir -p $2
mv $3/* $2/
rmdir $3
return 0
}
makedeb()
{
SUPPLEMENT=$1
DIRNAME=$PKGNAME
if [ $SUPPLEMENT = 1 ]; then
PKGNAME=$PKGNAME\32
if [ "$DEBARCH" = "i386" ]; then
DEBARCH=amd64
else
DEBARCH=arm64
fi
fi
umask 022
rm -f $PKGNAME\_$VERSION\_$DEBARCH.deb
TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX`
mkdir $TMPDIR/DEBIAN
if [ $SUPPLEMENT = 1 ]; then
make install DESTDIR=$TMPDIR
rm -rf $TMPDIR$BINDIR
if [ "$DATAROOTDIR" != "$PREFIX" ]; then
rm -rf $TMPDIR$DATAROOTDIR
fi
if [ "$JAVADIR" != "" ]; then
rm -rf $TMPDIR$JAVADIR
fi
rm -rf $TMPDIR$DOCDIR
rm -rf $TMPDIR$INCLUDEDIR
rm -rf $TMPDIR$MANDIR
else
make install DESTDIR=$TMPDIR
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then
safedirmove $TMPDIR/$DOCDIR $TMPDIR/usr/share/doc/$PKGNAME-$VERSION $TMPDIR/__tmpdoc
ln -fs /usr/share/doc/$DIRNAME-$VERSION $TMPDIR$DOCDIR
fi
fi
SIZE=`du -s $TMPDIR | cut -f1`
(cat pkgscripts/deb-control | sed s/{__PKGNAME}/$PKGNAME/g \
| sed s/{__ARCH}/$DEBARCH/g | sed s/{__SIZE}/$SIZE/g \
> $TMPDIR/DEBIAN/control)
/sbin/ldconfig -n $TMPDIR$LIBDIR
$SUDO chown -Rh root:root $TMPDIR/*
dpkg -b $TMPDIR $PKGNAME\_$VERSION\_$DEBARCH.deb
}
PKGNAME=@PKGNAME@
VERSION=@VERSION@
DEBARCH=@DEBARCH@
PREFIX=@CMAKE_INSTALL_PREFIX@
BINDIR=@CMAKE_INSTALL_FULL_BINDIR@
DATAROOTDIR=@CMAKE_INSTALL_FULL_DATAROOTDIR@
DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@
INCLUDEDIR=@CMAKE_INSTALL_FULL_INCLUDEDIR@
JAVADIR=@CMAKE_INSTALL_FULL_JAVADIR@
LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@
MANDIR=@CMAKE_INSTALL_FULL_MANDIR@
if [ ! `uid` -eq 0 ]; then
SUDO=sudo
fi
makedeb 0
if [ "$DEBARCH" = "i386" -o "$DEBARCH" = "armel" -o "$DEBARCH" = "armhf" ]; then
makedeb 1
fi
exit

View file

@ -0,0 +1,284 @@
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
rm -rf $TMPDIR
fi
}
safedirmove ()
{
if [ "$1" = "$2" ]; then
return 0
fi
if [ "$1" = "" -o ! -d "$1" ]; then
echo safedirmove: source dir $1 is not valid
return 1
fi
if [ "$2" = "" -o -e "$2" ]; then
echo safedirmove: dest dir $2 is not valid
return 1
fi
if [ "$3" = "" -o -e "$3" ]; then
echo safedirmove: tmp dir $3 is not valid
return 1
fi
mkdir -p $3
mv $1/* $3/
rmdir $1
mkdir -p $2
mv $3/* $2/
rmdir $3
return 0
}
usage()
{
echo "$0 [universal] [-lipo [path to lipo]]"
exit 1
}
UNIVERSAL=0
PKGNAME=@PKGNAME@
VERSION=@VERSION@
BUILD=@BUILD@
SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@
BUILDDIR32=@OSX_32BIT_BUILD@
BUILDDIRARMV7=@IOS_ARMV7_BUILD@
BUILDDIRARMV7S=@IOS_ARMV7S_BUILD@
BUILDDIRARMV8=@IOS_ARMV8_BUILD@
WITH_JAVA=@WITH_JAVA@
OSX_APP_CERT_NAME="@OSX_APP_CERT_NAME@"
OSX_INST_CERT_NAME="@OSX_INST_CERT_NAME@"
LIPO=lipo
PREFIX=@CMAKE_INSTALL_PREFIX@
BINDIR=@CMAKE_INSTALL_FULL_BINDIR@
DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@
LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@
LIBJPEG_DSO_NAME=libjpeg.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@.dylib
TURBOJPEG_DSO_NAME=libturbojpeg.@TURBOJPEG_SO_VERSION@.dylib
while [ $# -gt 0 ]; do
case $1 in
-h*)
usage 0
;;
-lipo)
if [ $# -gt 1 ]; then
if [[ ! "$2" =~ -.* ]]; then
LIPO=$2; shift
fi
fi
;;
universal)
UNIVERSAL=1
;;
esac
shift
done
if [ -f $PKGNAME-$VERSION.dmg ]; then
rm -f $PKGNAME-$VERSION.dmg
fi
umask 022
TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX`
PKGROOT=$TMPDIR/pkg/Package_Root
mkdir -p $PKGROOT
make install DESTDIR=$PKGROOT
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then
mkdir -p $PKGROOT/Library/Documentation
safedirmove $PKGROOT$DOCDIR $PKGROOT/Library/Documentation/$PKGNAME $TMPDIR/__tmpdoc
ln -fs /Library/Documentation/$PKGNAME $PKGROOT$DOCDIR
fi
if [ $UNIVERSAL = 1 -a "$BUILDDIR32" != "" ]; then
if [ ! -d $BUILDDIR32 ]; then
echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
exit 1
fi
if [ ! -f $BUILDDIR32/Makefile ]; then
echo ERROR: 32-bit build directory $BUILDDIR32 is not configured
exit 1
fi
mkdir -p $TMPDIR/dist.x86
pushd $BUILDDIR32
make install DESTDIR=$TMPDIR/dist.x86
popd
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/$LIBJPEG_DSO_NAME \
-arch x86_64 $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME \
-output $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.a \
-arch x86_64 $PKGROOT/$LIBDIR/libjpeg.a \
-output $PKGROOT/$LIBDIR/libjpeg.a
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/$TURBOJPEG_DSO_NAME \
-arch x86_64 $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME \
-output $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libturbojpeg.a \
-arch x86_64 $PKGROOT/$LIBDIR/libturbojpeg.a \
-output $PKGROOT/$LIBDIR/libturbojpeg.a
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/cjpeg \
-arch x86_64 $PKGROOT/$BINDIR/cjpeg \
-output $PKGROOT/$BINDIR/cjpeg
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/djpeg \
-arch x86_64 $PKGROOT/$BINDIR/djpeg \
-output $PKGROOT/$BINDIR/djpeg
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/jpegtran \
-arch x86_64 $PKGROOT/$BINDIR/jpegtran \
-output $PKGROOT/$BINDIR/jpegtran
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/tjbench \
-arch x86_64 $PKGROOT/$BINDIR/tjbench \
-output $PKGROOT/$BINDIR/tjbench
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/rdjpgcom \
-arch x86_64 $PKGROOT/$BINDIR/rdjpgcom \
-output $PKGROOT/$BINDIR/rdjpgcom
$LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/wrjpgcom \
-arch x86_64 $PKGROOT/$BINDIR/wrjpgcom \
-output $PKGROOT/$BINDIR/wrjpgcom
fi
install_ios()
{
BUILDDIR=$1
ARCHNAME=$2
DIRNAME=$3
LIPOARCH=$4
if [ ! -d $BUILDDIR ]; then
echo ERROR: $ARCHNAME build directory $BUILDDIR does not exist
exit 1
fi
if [ ! -f $BUILDDIR/Makefile ]; then
echo ERROR: $ARCHNAME build directory $BUILDDIR is not configured
exit 1
fi
mkdir -p $TMPDIR/dist.$DIRNAME
pushd $BUILDDIR
make install DESTDIR=$TMPDIR/dist.$DIRNAME
popd
$LIPO -create \
$PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/$LIBJPEG_DSO_NAME \
-output $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME
$LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.a \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/libjpeg.a \
-output $PKGROOT/$LIBDIR/libjpeg.a
$LIPO -create \
$PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/$TURBOJPEG_DSO_NAME \
-output $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME
$LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.a \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/libturbojpeg.a \
-output $PKGROOT/$LIBDIR/libturbojpeg.a
$LIPO -create \
$PKGROOT/$BINDIR/cjpeg \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/cjpeg \
-output $PKGROOT/$BINDIR/cjpeg
$LIPO -create \
$PKGROOT/$BINDIR/djpeg \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/djpeg \
-output $PKGROOT/$BINDIR/djpeg
$LIPO -create \
$PKGROOT/$BINDIR/jpegtran \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/jpegtran \
-output $PKGROOT/$BINDIR/jpegtran
$LIPO -create \
$PKGROOT/$BINDIR/tjbench \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/tjbench \
-output $PKGROOT/$BINDIR/tjbench
$LIPO -create \
$PKGROOT/$BINDIR/rdjpgcom \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/rdjpgcom \
-output $PKGROOT/$BINDIR/rdjpgcom
$LIPO -create \
$PKGROOT/$BINDIR/wrjpgcom \
-arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/wrjpgcom \
-output $PKGROOT/$BINDIR/wrjpgcom
}
if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV7" != "" ]; then
install_ios $BUILDDIRARMV7 Armv7 armv7 arm
fi
if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV7S" != "" ]; then
install_ios $BUILDDIRARMV7S Armv7s armv7s arm
fi
if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV8" != "" ]; then
install_ios $BUILDDIRARMV8 Armv8 armv8 arm64
fi
install_name_tool -id $LIBDIR/$LIBJPEG_DSO_NAME $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME
install_name_tool -id $LIBDIR/$TURBOJPEG_DSO_NAME $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME
if [ $WITH_JAVA = 1 ]; then
ln -fs $TURBOJPEG_DSO_NAME $PKGROOT/$LIBDIR/libturbojpeg.jnilib
fi
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$LIBDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/lib" ]; then
if [ ! -h $PKGROOT/$PREFIX/lib32 ]; then
ln -fs lib $PKGROOT/$PREFIX/lib32
fi
if [ ! -h $PKGROOT/$PREFIX/lib64 ]; then
ln -fs lib $PKGROOT/$PREFIX/lib64
fi
fi
mkdir -p $TMPDIR/pkg
install -m 755 pkgscripts/uninstall $PKGROOT/$BINDIR/
find $PKGROOT -type f | while read file; do xattr -c $file; done
cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.txt $TMPDIR/pkg/
mkdir $TMPDIR/dmg
pkgbuild --root $PKGROOT --version $VERSION.$BUILD --identifier @PKGID@ \
$TMPDIR/pkg/$PKGNAME.pkg
SUFFIX=
if [ "$OSX_INST_CERT_NAME" != "" ]; then
SUFFIX=-unsigned
fi
productbuild --distribution pkgscripts/Distribution.xml \
--package-path $TMPDIR/pkg/ --resources $TMPDIR/pkg/ \
$TMPDIR/dmg/$PKGNAME$SUFFIX.pkg
if [ "$OSX_INST_CERT_NAME" != "" ]; then
productsign --sign "$OSX_INST_CERT_NAME" --timestamp \
$TMPDIR/dmg/$PKGNAME$SUFFIX.pkg $TMPDIR/dmg/$PKGNAME.pkg
rm -r $TMPDIR/dmg/$PKGNAME$SUFFIX.pkg
pkgutil --check-signature $TMPDIR/dmg/$PKGNAME.pkg
fi
hdiutil create -fs HFS+ -volname $PKGNAME-$VERSION \
-srcfolder "$TMPDIR/dmg" $TMPDIR/$PKGNAME-$VERSION.dmg
if [ "$OSX_APP_CERT_NAME" != "" ]; then
codesign -s "$OSX_APP_CERT_NAME" --timestamp $TMPDIR/$PKGNAME-$VERSION.dmg
codesign -vv $TMPDIR/$PKGNAME-$VERSION.dmg
fi
cp $TMPDIR/$PKGNAME-$VERSION.dmg .
exit

View file

@ -0,0 +1,30 @@
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
rm -rf $TMPDIR
fi
}
if [ -f @PKGNAME@-@VERSION@.@RPMARCH@.rpm ]; then
rm -f @PKGNAME@-@VERSION@.@RPMARCH@.rpm
fi
umask 022
TMPDIR=`mktemp -d /tmp/@CMAKE_PROJECT_NAME@-build.XXXXXX`
mkdir -p $TMPDIR/RPMS
ln -fs `pwd` $TMPDIR/BUILD
rpmbuild -bb --define "_blddir $TMPDIR/buildroot" --define "_topdir $TMPDIR" \
--target @RPMARCH@ pkgscripts/rpm.spec; \
cp $TMPDIR/RPMS/@RPMARCH@/@PKGNAME@-@VERSION@-@BUILD@.@RPMARCH@.rpm \
@PKGNAME@-@VERSION@.@RPMARCH@.rpm

View file

@ -0,0 +1,48 @@
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
rm -rf $TMPDIR
fi
}
PKGNAME=@PKGNAME@
PROJECT=@CMAKE_PROJECT_NAME@
VERSION=@VERSION@
BUILD=@BUILD@
if [ -f $PKGNAME-$VERSION.src.rpm ]; then
rm -f $PKGNAME-$VERSION.src.rpm
fi
umask 022
TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX`
mkdir -p $TMPDIR/RPMS
mkdir -p $TMPDIR/SRPMS
mkdir -p $TMPDIR/BUILD
mkdir -p $TMPDIR/SOURCES
mkdir -p $TMPDIR/SPECS
if [ ! -f $PROJECT-$VERSION.tar.gz ]; then
echo "ERROR: $PROJECT-$VERSION.tar.gz does not exist."
fi
cp $PROJECT-$VERSION.tar.gz $TMPDIR/SOURCES/$PROJECT-$VERSION.tar.gz
cat pkgscripts/rpm.spec | sed s/%{_blddir}/%{_tmppath}/g \
| sed s/#--\>//g > $TMPDIR/SPECS/$PKGNAME.spec
rpmbuild -bs --define "_topdir $TMPDIR" $TMPDIR/SPECS/$PKGNAME.spec
mv $TMPDIR/SRPMS/$PKGNAME-$VERSION-$BUILD.src.rpm $PKGNAME-$VERSION.src.rpm
exit

View file

@ -0,0 +1,51 @@
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
SUDO=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
rm -rf $TMPDIR
fi
}
uid()
{
id | cut -f2 -d = | cut -f1 -d \(;
}
PKGNAME=@PKGNAME@
VERSION=@VERSION@
ARCH=@CPU_TYPE@
OS=@CMAKE_SYSTEM_NAME@
PREFIX=@CMAKE_INSTALL_PREFIX@
umask 022
rm -f $PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX`
mkdir -p $TMPDIR/install
make install DESTDIR=$TMPDIR/install
echo tartest >$TMPDIR/tartest
GNUTAR=0
BSDTAR=0
tar cf $TMPDIR/tartest.tar --owner=root --group=root -C $TMPDIR tartest >/dev/null 2>&1 && GNUTAR=1
if [ "$GNUTAR" = "1" ]; then
tar cf - --owner=root --group=root -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
else
tar cf $TMPDIR/tartest.tar --uid 0 --gid 0 -C $TMPDIR tartest >/dev/null 2>&1 && BSDTAR=1
if [ "$BSDTAR" = "1" ]; then
tar cf - --uid=0 --gid=0 -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
else
tar cf - -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2
fi
fi
exit

View file

@ -0,0 +1,221 @@
%global _docdir %{_defaultdocdir}/%{name}-%{version}
%define _prefix @CMAKE_INSTALL_PREFIX@
%define _bindir @CMAKE_INSTALL_FULL_BINDIR@
%define _datarootdir @CMAKE_INSTALL_FULL_DATAROOTDIR@
%define _includedir @CMAKE_INSTALL_FULL_INCLUDEDIR@
%define _javadir @CMAKE_INSTALL_FULL_JAVADIR@
%define _mandir @CMAKE_INSTALL_FULL_MANDIR@
%define _enable_static @ENABLE_STATIC@
%define _enable_shared @ENABLE_SHARED@
%define _with_turbojpeg @WITH_TURBOJPEG@
%define _with_java @WITH_JAVA@
%if "%{?__isa_bits:1}" == "1"
%define _bits %{__isa_bits}
%else
# RPM < 4.6
%if "%{_lib}" == "lib64"
%define _bits 64
%else
%define _bits 32
%endif
%endif
#-->%if 1
%if "%{_bits}" == "64"
%define _libdir %{_exec_prefix}/lib64
%else
%if "%{_prefix}" == "/opt/libjpeg-turbo"
%define _libdir %{_exec_prefix}/lib32
%endif
%endif
#-->%else
%define _libdir @CMAKE_INSTALL_FULL_LIBDIR@
#-->%endif
Summary: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs
Name: @PKGNAME@
Version: @VERSION@
Vendor: @PKGVENDOR@
URL: @PKGURL@
Group: System Environment/Libraries
#-->Source0: http://prdownloads.sourceforge.net/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@-%{version}.tar.gz
Release: @BUILD@
License: BSD-style
BuildRoot: %{_blddir}/%{name}-buildroot-%{version}-%{release}
Requires: /sbin/ldconfig
%if "%{_bits}" == "64"
Provides: %{name} = %{version}-%{release}, @CMAKE_PROJECT_NAME@ = %{version}-%{release}, libturbojpeg.so()(64bit)
%else
Provides: %{name} = %{version}-%{release}, @CMAKE_PROJECT_NAME@ = %{version}-%{release}, libturbojpeg.so
%endif
%description
libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate
baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and
MIPS systems, as well as progressive JPEG compression on x86 and x86-64
systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg,
all else being equal. On other types of systems, libjpeg-turbo can still
outperform libjpeg by a significant amount, by virtue of its highly-optimized
Huffman coding routines. In many cases, the performance of libjpeg-turbo
rivals that of proprietary high-speed JPEG codecs.
libjpeg-turbo implements both the traditional libjpeg API as well as the less
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
colorspace extensions that allow it to compress from/decompress to 32-bit and
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
interface.
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
VirtualGL projects made numerous enhancements to the codec in 2009, and in
early 2010, libjpeg-turbo spun off into an independent project, with the goal
of making high-speed JPEG compression/decompression technology available to a
broader range of users and developers.
#-->%prep
#-->%setup -q -n @CMAKE_PROJECT_NAME@-%{version}
#-->%build
#-->cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ \
#--> -DBUILD=%{release} \
#--> -DCMAKE_INSTALL_BINDIR=%{_bindir} \
#--> -DCMAKE_INSTALL_DATAROOTDIR=%{_datarootdir} \
#--> -DCMAKE_INSTALL_DOCDIR=%{_docdir} \
#--> -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
#--> -DCMAKE_INSTALL_JAVADIR=%{_javadir} \
#--> -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
#--> -DCMAKE_INSTALL_MANDIR=%{_mandir} \
#--> -DCMAKE_INSTALL_PREFIX=%{_prefix} \
#--> -DCMAKE_POSITION_INDEPENDENT_CODE=@CMAKE_POSITION_INDEPENDENT_CODE@ \
#--> -DENABLE_SHARED=@ENABLE_SHARED@ -DENABLE_STATIC=@ENABLE_STATIC@ \
#--> -DSO_MAJOR_VERSION=@SO_MAJOR_VERSION@ \
#--> -DSO_MINOR_VERSION=@SO_MINOR_VERSION@ \
#--> -DJPEG_LIB_VERSION=@JPEG_LIB_VERSION@ \
#--> -DREQUIRE_SIMD=@REQUIRE_SIMD@ \
#--> -DWITH_12BIT=@WITH_12BIT@ -DWITH_ARITH_DEC=@WITH_ARITH_DEC@ \
#--> -DWITH_ARITH_ENC=@WITH_ARITH_ENC@ -DWITH_JAVA=@WITH_JAVA@ \
#--> -DWITH_JPEG7=@WITH_JPEG7@ -DWITH_JPEG8=@WITH_JPEG8@ \
#--> -DWITH_MEM_SRCDST=@WITH_MEM_SRCDST@ -DWITH_SIMD=@WITH_SIMD@ \
#--> -DWITH_TURBOJPEG=@WITH_TURBOJPEG@ .
#-->make DESTDIR=$RPM_BUILD_ROOT
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
#-->%if 0
# This is only needed to support in-tree RPM generation via 'make rpm'. When
# building from a SRPM, we control where things are installed via CMake
# variables.
safedirmove ()
{
if [ "$1" = "$2" ]; then
return 0
fi
if [ "$1" = "" -o ! -d "$1" ]; then
echo safedirmove: source dir $1 is not valid
return 1
fi
if [ "$2" = "" -o -e "$2" ]; then
echo safedirmove: dest dir $2 is not valid
return 1
fi
if [ "$3" = "" -o -e "$3" ]; then
echo safedirmove: tmp dir $3 is not valid
return 1
fi
mkdir -p $3
mv $1/* $3/
rmdir $1
mkdir -p $2
mv $3/* $2/
rmdir $3
return 0
}
LJT_DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@
if [ ! "$LJT_DOCDIR" = "%{_docdir}" ]; then
safedirmove $RPM_BUILD_ROOT/$LJT_DOCDIR $RPM_BUILD_ROOT/%{_docdir} $RPM_BUILD_ROOT/__tmpdoc
fi
#-->%endif
LJT_DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@
if [ "%{_prefix}" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$LJT_DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then
ln -fs %{_docdir} $RPM_BUILD_ROOT/$LJT_DOCDIR
fi
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir %{_docdir}
%doc %{_docdir}/*
%dir %{_prefix}
%if "%{_prefix}" == "@CMAKE_INSTALL_DEFAULT_PREFIX@" && "%{_docdir}" != "%{_prefix}/doc"
%{_prefix}/doc
%endif
%dir %{_bindir}
%{_bindir}/cjpeg
%{_bindir}/djpeg
%{_bindir}/jpegtran
%if "%{_with_turbojpeg}" == "1"
%{_bindir}/tjbench
%endif
%{_bindir}/rdjpgcom
%{_bindir}/wrjpgcom
%dir %{_libdir}
%if "%{_enable_shared}" == "1"
%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@
%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@
%{_libdir}/libjpeg.so
%endif
%if "%{_enable_static}" == "1"
%{_libdir}/libjpeg.a
%endif
%dir %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/libjpeg.pc
%if "%{_with_turbojpeg}" == "1"
%if "%{_enable_shared}" == "1" || "%{_with_java}" == "1"
%{_libdir}/libturbojpeg.so.@TURBOJPEG_SO_VERSION@
%{_libdir}/libturbojpeg.so.@TURBOJPEG_SO_MAJOR_VERSION@
%{_libdir}/libturbojpeg.so
%endif
%if "%{_enable_static}" == "1"
%{_libdir}/libturbojpeg.a
%endif
%{_libdir}/pkgconfig/libturbojpeg.pc
%endif
%dir %{_includedir}
%{_includedir}/jconfig.h
%{_includedir}/jerror.h
%{_includedir}/jmorecfg.h
%{_includedir}/jpeglib.h
%if "%{_with_turbojpeg}" == "1"
%{_includedir}/turbojpeg.h
%endif
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/cjpeg.1*
%{_mandir}/man1/djpeg.1*
%{_mandir}/man1/jpegtran.1*
%{_mandir}/man1/rdjpgcom.1*
%{_mandir}/man1/wrjpgcom.1*
%if "%{_prefix}" != "%{_datarootdir}"
%dir %{_datarootdir}
%endif
%if "%{_with_java}" == "1"
%dir %{_javadir}
%{_javadir}/turbojpeg.jar
%endif
%changelog

View file

@ -0,0 +1,113 @@
# Copyright (C)2009-2011, 2013, 2016 D. R. Commander. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# - Neither the name of the libjpeg-turbo Project nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#!/bin/sh
if [ ! "`id -u`" = "0" ]; then
echo "ERROR: This script must be executed as root"
exit -1
fi
PKGNAME=@PKGNAME@
PKGID=@PKGID@
RECEIPT=/Library/Receipts/$PKGNAME.pkg
LSBOM=
if [ -d $RECEIPT ]; then
LSBOM='lsbom -s -f -l '$RECEIPT'/Contents/Archive.bom'
else
LSBOM='pkgutil --files '$PKGID
fi
mylsbom()
{
$LSBOM || (echo "ERROR: Could not list package contents"; exit -1)
}
echo Removing package files ...
EXITSTATUS=0
pushd /
mylsbom | while read file; do
if [ ! -d "$file" ]; then rm "$file" 2>&1 || EXITSTATUS=-1; fi
done
popd
echo Removing package directories ...
PREFIX=@CMAKE_INSTALL_PREFIX@
BINDIR=@CMAKE_INSTALL_FULL_BINDIR@
DATAROOTDIR=@CMAKE_INSTALL_FULL_DATAROOTDIR@
INCLUDEDIR=@CMAKE_INSTALL_FULL_INCLUDEDIR@
JAVADIR=@CMAKE_INSTALL_FULL_JAVADIR@
LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@
MANDIR=@CMAKE_INSTALL_FULL_MANDIR@
if [ -d $BINDIR ]; then
rmdir $BINDIR 2>&1 || EXITSTATUS=-1
fi
if [ -d $LIBDIR/pkgconfig ]; then
rmdir $LIBDIR/pkgconfig 2>&1 || EXITSTATUS=-1
fi
if [ -d $LIBDIR ]; then
rmdir $LIBDIR 2>&1 || EXITSTATUS=-1
fi
if [ -d $INCLUDEDIR ]; then
rmdir $INCLUDEDIR 2>&1 || EXITSTATUS=-1
fi
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$LIBDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/lib" ]; then
if [ -h $LIBDIR\32 ]; then
rm $LIBDIR\32 2>&1 || EXITSTATUS=-1
fi
if [ -h $LIBDIR\64 ]; then
rm $LIBDIR\64 2>&1 || EXITSTATUS=-1
fi
fi
if [ -d $MANDIR/man1 ]; then
rmdir $MANDIR/man1 2>&1 || EXITSTATUS=-1
fi
if [ -d $MANDIR ]; then
rmdir $MANDIR 2>&1 || EXITSTATUS=-1
fi
if [ -d $JAVADIR ]; then
rmdir $JAVADIR 2>&1 || EXITSTATUS=-1
fi
if [ -d $DATAROOTDIR -a "$DATAROOTDIR" != "$PREFIX" ]; then
rmdir $DATAROOTDIR 2>&1 || EXITSTATUS=-1
fi
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a -h "$PREFIX/doc" ]; then
rm $PREFIX/doc 2>&1 || EXITSTATUS=-1
fi
rmdir $PREFIX 2>&1 || EXITSTATUS=-1
rmdir /Library/Documentation/$PKGNAME 2>&1 || EXITSTATUS=-1
if [ -d $RECEIPT ]; then
echo Removing package receipt ...
rm -r $RECEIPT 2>&1 || EXITSTATUS=-1
else
echo Forgetting package $PKGID ...
pkgutil --forget $PKGID
fi
exit $EXITSTATUS

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6b68ebbac82e481754b005e96947ab26f5b7f6f48c3027d4f8335aa8218000d3
size 1663666

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:303effccaa3ae593b8831775a3a10e9468064d7253d1477f0a088962b8334db1
size 1685268

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf1d4e85737c2e4e5f06fc219653cfcd7768333a9390b97eca7cf933db5319b5
size 1314042

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26ff075c51dee355cab1029c43c84cda096bb5e65f657b6188edb8215158b5b2
size 1120054

View file

@ -45,45 +45,45 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -20,14 +20,14 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(SolutionDir)\zlib.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

View file

@ -44,42 +44,42 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -44,42 +44,42 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -44,42 +44,42 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -44,42 +44,42 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -56,27 +56,27 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
@ -86,11 +86,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:599cbc3110c8df7c3cecfc80a45ba67cb5af20d075dfd34fa1730196460ba6b8
size 2056124

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15090224a424ccf7e95c149b3489c98515d026b6879b98ae8250b722496685eb
size 15480932

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2117ba036dbdd6e02fa43bae0afb25b38aed02ca287fae74204002282ce71f9e
size 2448486

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fefabb9e4c5d5ad57ce65314bb9d20c39c6631daefbd4d7093557f88bcbd9105
size 15021212

View file

@ -1,28 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 14 for Windows Desktop
VisualStudioVersion = 14.0.25123.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.32407.337
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SuperLU", "SuperLU.vcxproj", "{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|Win32.ActiveCfg = Debug|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|Win32.Build.0 = Debug|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x64.ActiveCfg = Debug|x64
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x64.Build.0 = Debug|x64
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|Win32.ActiveCfg = Release|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|Win32.Build.0 = Release|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x86.ActiveCfg = Debug|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x86.Build.0 = Debug|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x64.ActiveCfg = Release|x64
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x64.Build.0 = Release|x64
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x86.ActiveCfg = Release|Win32
{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {94E9E6F5-434B-4C8C-B7DD-9BC609715756}
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,338 @@
<?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>{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}</ProjectGuid>
<RootNamespace>SuperLU</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</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.32002.118</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>USE_VENDOR_BLAS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName).d.lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>USE_VENDOR_BLAS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>USE_VENDOR_BLAS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ProjectName).d.lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>USE_VENDOR_BLAS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\SRC\ccolumn_bmod.c" />
<ClCompile Include="..\..\SRC\ccolumn_dfs.c" />
<ClCompile Include="..\..\SRC\ccopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\cdiagonal.c" />
<ClCompile Include="..\..\SRC\cgscon.c" />
<ClCompile Include="..\..\SRC\cgsequ.c" />
<ClCompile Include="..\..\SRC\cgsisx.c" />
<ClCompile Include="..\..\SRC\cgsitrf.c" />
<ClCompile Include="..\..\SRC\cgsrfs.c" />
<ClCompile Include="..\..\SRC\cgssv.c" />
<ClCompile Include="..\..\SRC\cgssvx.c" />
<ClCompile Include="..\..\SRC\cgstrf.c" />
<ClCompile Include="..\..\SRC\cgstrs.c" />
<ClCompile Include="..\..\SRC\clacon.c" />
<ClCompile Include="..\..\SRC\clangs.c" />
<ClCompile Include="..\..\SRC\claqgs.c" />
<ClCompile Include="..\..\SRC\cldperm.c" />
<ClCompile Include="..\..\SRC\cmemory.c" />
<ClCompile Include="..\..\SRC\cmyblas2.c" />
<ClCompile Include="..\..\SRC\colamd.c" />
<ClCompile Include="..\..\SRC\cpanel_bmod.c" />
<ClCompile Include="..\..\SRC\cpanel_dfs.c" />
<ClCompile Include="..\..\SRC\cpivotgrowth.c" />
<ClCompile Include="..\..\SRC\cpivotL.c" />
<ClCompile Include="..\..\SRC\cpruneL.c" />
<ClCompile Include="..\..\SRC\creadhb.c" />
<ClCompile Include="..\..\SRC\creadrb.c" />
<ClCompile Include="..\..\SRC\creadtriple.c" />
<ClCompile Include="..\..\SRC\csnode_bmod.c" />
<ClCompile Include="..\..\SRC\csnode_dfs.c" />
<ClCompile Include="..\..\SRC\csp_blas2.c" />
<ClCompile Include="..\..\SRC\csp_blas3.c" />
<ClCompile Include="..\..\SRC\cutil.c" />
<ClCompile Include="..\..\SRC\dcolumn_bmod.c" />
<ClCompile Include="..\..\SRC\dcolumn_dfs.c" />
<ClCompile Include="..\..\SRC\dcomplex.c" />
<ClCompile Include="..\..\SRC\dcopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\ddiagonal.c" />
<ClCompile Include="..\..\SRC\dgscon.c" />
<ClCompile Include="..\..\SRC\dgsequ.c" />
<ClCompile Include="..\..\SRC\dgsisx.c" />
<ClCompile Include="..\..\SRC\dgsitrf.c" />
<ClCompile Include="..\..\SRC\dgsrfs.c" />
<ClCompile Include="..\..\SRC\dgssv.c" />
<ClCompile Include="..\..\SRC\dgssvx.c" />
<ClCompile Include="..\..\SRC\dgstrf.c" />
<ClCompile Include="..\..\SRC\dgstrs.c" />
<ClCompile Include="..\..\SRC\dlacon.c" />
<ClCompile Include="..\..\SRC\dlamch.c" />
<ClCompile Include="..\..\SRC\dlangs.c" />
<ClCompile Include="..\..\SRC\dlaqgs.c" />
<ClCompile Include="..\..\SRC\dldperm.c" />
<ClCompile Include="..\..\SRC\dmemory.c" />
<ClCompile Include="..\..\SRC\dmyblas2.c" />
<ClCompile Include="..\..\SRC\dpanel_bmod.c" />
<ClCompile Include="..\..\SRC\dpanel_dfs.c" />
<ClCompile Include="..\..\SRC\dpivotgrowth.c" />
<ClCompile Include="..\..\SRC\dpivotL.c" />
<ClCompile Include="..\..\SRC\dpruneL.c" />
<ClCompile Include="..\..\SRC\dreadhb.c" />
<ClCompile Include="..\..\SRC\dreadrb.c" />
<ClCompile Include="..\..\SRC\dreadtriple.c" />
<ClCompile Include="..\..\SRC\dsnode_bmod.c" />
<ClCompile Include="..\..\SRC\dsnode_dfs.c" />
<ClCompile Include="..\..\SRC\dsp_blas2.c" />
<ClCompile Include="..\..\SRC\dsp_blas3.c" />
<ClCompile Include="..\..\SRC\dutil.c" />
<ClCompile Include="..\..\SRC\dzsum1.c" />
<ClCompile Include="..\..\SRC\get_perm_c.c" />
<ClCompile Include="..\..\SRC\heap_relax_snode.c" />
<ClCompile Include="..\..\SRC\icmax1.c" />
<ClCompile Include="..\..\SRC\ilu_ccolumn_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_ccopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\ilu_cdrop_row.c" />
<ClCompile Include="..\..\SRC\ilu_cpanel_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_cpivotL.c" />
<ClCompile Include="..\..\SRC\ilu_csnode_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_dcolumn_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_dcopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\ilu_ddrop_row.c" />
<ClCompile Include="..\..\SRC\ilu_dpanel_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_dpivotL.c" />
<ClCompile Include="..\..\SRC\ilu_dsnode_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_heap_relax_snode.c" />
<ClCompile Include="..\..\SRC\ilu_relax_snode.c" />
<ClCompile Include="..\..\SRC\ilu_scolumn_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_scopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\ilu_sdrop_row.c" />
<ClCompile Include="..\..\SRC\ilu_spanel_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_spivotL.c" />
<ClCompile Include="..\..\SRC\ilu_ssnode_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_zcolumn_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_zcopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\ilu_zdrop_row.c" />
<ClCompile Include="..\..\SRC\ilu_zpanel_dfs.c" />
<ClCompile Include="..\..\SRC\ilu_zpivotL.c" />
<ClCompile Include="..\..\SRC\ilu_zsnode_dfs.c" />
<ClCompile Include="..\..\SRC\izmax1.c" />
<ClCompile Include="..\..\SRC\lsame.c" />
<ClCompile Include="..\..\SRC\mark_relax.c" />
<ClCompile Include="..\..\SRC\mc64ad.c" />
<ClCompile Include="..\..\SRC\memory.c" />
<ClCompile Include="..\..\SRC\mmd.c" />
<ClCompile Include="..\..\SRC\qselect.c" />
<ClCompile Include="..\..\SRC\relax_snode.c" />
<ClCompile Include="..\..\SRC\scolumn_bmod.c" />
<ClCompile Include="..\..\SRC\scolumn_dfs.c" />
<ClCompile Include="..\..\SRC\scomplex.c" />
<ClCompile Include="..\..\SRC\scopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\scsum1.c" />
<ClCompile Include="..\..\SRC\sdiagonal.c" />
<ClCompile Include="..\..\SRC\sgscon.c" />
<ClCompile Include="..\..\SRC\sgsequ.c" />
<ClCompile Include="..\..\SRC\sgsisx.c" />
<ClCompile Include="..\..\SRC\sgsitrf.c" />
<ClCompile Include="..\..\SRC\sgsrfs.c" />
<ClCompile Include="..\..\SRC\sgssv.c" />
<ClCompile Include="..\..\SRC\sgssvx.c" />
<ClCompile Include="..\..\SRC\sgstrf.c" />
<ClCompile Include="..\..\SRC\sgstrs.c" />
<ClCompile Include="..\..\SRC\slacon.c" />
<ClCompile Include="..\..\SRC\slamch.c" />
<ClCompile Include="..\..\SRC\slangs.c" />
<ClCompile Include="..\..\SRC\slaqgs.c" />
<ClCompile Include="..\..\SRC\sldperm.c" />
<ClCompile Include="..\..\SRC\smemory.c" />
<ClCompile Include="..\..\SRC\smyblas2.c" />
<ClCompile Include="..\..\SRC\spanel_bmod.c" />
<ClCompile Include="..\..\SRC\spanel_dfs.c" />
<ClCompile Include="..\..\SRC\spivotgrowth.c" />
<ClCompile Include="..\..\SRC\spivotL.c" />
<ClCompile Include="..\..\SRC\spruneL.c" />
<ClCompile Include="..\..\SRC\sp_coletree.c" />
<ClCompile Include="..\..\SRC\sp_ienv.c" />
<ClCompile Include="..\..\SRC\sp_preorder.c" />
<ClCompile Include="..\..\SRC\sreadhb.c" />
<ClCompile Include="..\..\SRC\sreadrb.c" />
<ClCompile Include="..\..\SRC\sreadtriple.c" />
<ClCompile Include="..\..\SRC\ssnode_bmod.c" />
<ClCompile Include="..\..\SRC\ssnode_dfs.c" />
<ClCompile Include="..\..\SRC\ssp_blas2.c" />
<ClCompile Include="..\..\SRC\ssp_blas3.c" />
<ClCompile Include="..\..\SRC\superlu_timer.c" />
<ClCompile Include="..\..\SRC\sutil.c" />
<ClCompile Include="..\..\SRC\util.c" />
<ClCompile Include="..\..\SRC\xerbla.c" />
<ClCompile Include="..\..\SRC\zcolumn_bmod.c" />
<ClCompile Include="..\..\SRC\zcolumn_dfs.c" />
<ClCompile Include="..\..\SRC\zcopy_to_ucol.c" />
<ClCompile Include="..\..\SRC\zdiagonal.c" />
<ClCompile Include="..\..\SRC\zgscon.c" />
<ClCompile Include="..\..\SRC\zgsequ.c" />
<ClCompile Include="..\..\SRC\zgsisx.c" />
<ClCompile Include="..\..\SRC\zgsitrf.c" />
<ClCompile Include="..\..\SRC\zgsrfs.c" />
<ClCompile Include="..\..\SRC\zgssv.c" />
<ClCompile Include="..\..\SRC\zgssvx.c" />
<ClCompile Include="..\..\SRC\zgstrf.c" />
<ClCompile Include="..\..\SRC\zgstrs.c" />
<ClCompile Include="..\..\SRC\zlacon.c" />
<ClCompile Include="..\..\SRC\zlangs.c" />
<ClCompile Include="..\..\SRC\zlaqgs.c" />
<ClCompile Include="..\..\SRC\zldperm.c" />
<ClCompile Include="..\..\SRC\zmemory.c" />
<ClCompile Include="..\..\SRC\zmyblas2.c" />
<ClCompile Include="..\..\SRC\zpanel_bmod.c" />
<ClCompile Include="..\..\SRC\zpanel_dfs.c" />
<ClCompile Include="..\..\SRC\zpivotgrowth.c" />
<ClCompile Include="..\..\SRC\zpivotL.c" />
<ClCompile Include="..\..\SRC\zpruneL.c" />
<ClCompile Include="..\..\SRC\zreadhb.c" />
<ClCompile Include="..\..\SRC\zreadrb.c" />
<ClCompile Include="..\..\SRC\zreadtriple.c" />
<ClCompile Include="..\..\SRC\zsnode_bmod.c" />
<ClCompile Include="..\..\SRC\zsnode_dfs.c" />
<ClCompile Include="..\..\SRC\zsp_blas2.c" />
<ClCompile Include="..\..\SRC\zsp_blas3.c" />
<ClCompile Include="..\..\SRC\zutil.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\SRC\colamd.h" />
<ClInclude Include="..\..\SRC\html_mainpage.h" />
<ClInclude Include="..\..\SRC\slu_cdefs.h" />
<ClInclude Include="..\..\SRC\slu_Cnames.h" />
<ClInclude Include="..\..\SRC\slu_dcomplex.h" />
<ClInclude Include="..\..\SRC\slu_ddefs.h" />
<ClInclude Include="..\..\SRC\slu_scomplex.h" />
<ClInclude Include="..\..\SRC\slu_sdefs.h" />
<ClInclude Include="..\..\SRC\slu_util.h" />
<ClInclude Include="..\..\SRC\slu_zdefs.h" />
<ClInclude Include="..\..\SRC\superlu_enum_consts.h" />
<ClInclude Include="..\..\SRC\supermatrix.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -0,0 +1,591 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\SRC\ccolumn_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ccolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ccopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cdiagonal.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgscon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgsequ.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgsisx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgsitrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgsrfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgssv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgssvx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgstrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cgstrs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\clacon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\clangs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\claqgs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cldperm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cmemory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cmyblas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\colamd.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cpanel_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cpanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cpivotgrowth.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cpivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cpruneL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\creadhb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\creadrb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\creadtriple.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\csnode_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\csnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\csp_blas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\csp_blas3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\cutil.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dcolumn_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dcolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dcomplex.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dcopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ddiagonal.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgscon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgsequ.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgsisx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgsitrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgsrfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgssv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgssvx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgstrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dgstrs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dlacon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dlamch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dlangs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dlaqgs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dldperm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dmemory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dmyblas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dpanel_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dpanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dpivotgrowth.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dpivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dpruneL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dreadhb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dreadrb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dreadtriple.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dsnode_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dsnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dsp_blas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dsp_blas3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dutil.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\dzsum1.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\get_perm_c.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\heap_relax_snode.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\icmax1.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_ccolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_ccopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_cdrop_row.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_cpanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_cpivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_csnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_dcolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_dcopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_ddrop_row.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_dpanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_dpivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_dsnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_heap_relax_snode.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_relax_snode.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_scolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_scopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_sdrop_row.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_spanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_spivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_ssnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_zcolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_zcopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_zdrop_row.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_zpanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_zpivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ilu_zsnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\izmax1.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\lsame.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\mark_relax.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\mc64ad.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\memory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\mmd.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\qselect.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\relax_snode.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\scolumn_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\scolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\scomplex.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\scopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\scsum1.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sdiagonal.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgscon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgsequ.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgsisx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgsitrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgsrfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgssv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgssvx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgstrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sgstrs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\slacon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\slamch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\slangs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\slaqgs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sldperm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\smemory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\smyblas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sp_coletree.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sp_ienv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sp_preorder.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\spanel_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\spanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\spivotgrowth.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\spivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\spruneL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sreadhb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sreadrb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sreadtriple.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ssnode_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ssnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ssp_blas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\ssp_blas3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\superlu_timer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\sutil.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\util.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\xerbla.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zcolumn_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zcolumn_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zcopy_to_ucol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zdiagonal.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgscon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgsequ.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgsisx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgsitrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgsrfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgssv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgssvx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgstrf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zgstrs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zlacon.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zlangs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zlaqgs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zldperm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zmemory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zmyblas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zpanel_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zpanel_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zpivotgrowth.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zpivotL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zpruneL.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zreadhb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zreadrb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zreadtriple.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zsnode_bmod.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zsnode_dfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zsp_blas2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zsp_blas3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SRC\zutil.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\SRC\colamd.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\html_mainpage.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_cdefs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_Cnames.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_dcomplex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_ddefs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_scomplex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_sdefs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\slu_zdefs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\superlu_enum_consts.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\SRC\supermatrix.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View file

@ -1,2 +0,0 @@
libtiff/tif_config.h
libtiff/tiffconf.h

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
Dear OpenVMS user
to make this library, execute
$@CONFIGURE
$@BUILD
Build process should be error and warning free. When process will be finished,
LIBTIFF$STRATUP.COM file containing all required definitions, will be created.
Please call it from system startup procedure or individual user procedure LOGIN.COM
To link software with libtiff, use TIFF:LIBTIFF.OPT
best regards,
Alexey Chupahin, elvis_75@mail.ru

View file

@ -1 +0,0 @@
20120922

View file

@ -1 +0,0 @@
4.0.3

View file

@ -1,142 +0,0 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View file

@ -1,584 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2006-10-15.18
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View file

@ -1,507 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2006-10-14.15
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
posix_glob=
posix_mkdir=
# Desired mode of installed file.
mode=0755
chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
shift
shift
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
done
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix=/ ;;
-*) prefix=./ ;;
*) prefix= ;;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS
IFS=/
$posix_glob && set -f
set fnord $dstdir
shift
$posix_glob && set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dst"; then
$doit $rmcmd -f "$dst" 2>/dev/null \
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
} || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View file

@ -1,367 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View file

@ -1,161 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2006-05-11.19
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View file

@ -1,27 +0,0 @@
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c

View file

@ -1,121 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sun Mar 6 13:59:56 2005 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>BMP2TIFF</title>
</head>
<body>
<h1 align=center>BMP2TIFF</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>bmp2tiff &minus; create a <small>TIFF</small> file from a
Microsoft Windows Device Independent Bitmap image file</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>bmp2tiff</b> [ <i>options</i> ] <i>input.bmp
output.tiff</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>bmp2tiff</i> converts a Microsoft Windows Device
Independent Bitmap image file to <small>TIFF.</small> By
default, the <small>TIFF</small> image is created with data
samples packed (<i>PlanarConfiguration</i>=1), compressed
with the PackBits algorithm
(<i>Compression</i>=<i>32773),</i> and with each strip no
more than 8 kilobytes. These characteristics can overridden,
or explicitly specified with the options described
below.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="2%">
<p><b>&minus;c</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify a compression scheme to use when writing image
data: <b>&minus;c none</b> for no compression, <b>-c
packbits</b> for the PackBits compression algorithm (the
default), <b>-c jpeg</b> for the baseline JPEG compression
algorithm, <b>-c zip</b> for the Deflate compression
algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
Welch.</p>
</td>
<td width="0%">
</td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>&minus;r &lt;number&gt;</b></p></td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="19%"></td>
<td width="80%">
<p>Write data with a specified number of rows per strip; by
default the number of rows/strip is selected so that each
strip is approximately 8 kilobytes.</p>
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>gif2tiff</i>(1), <i>pal2rgb</i>(1),
<i>ppm2tiff</i>(1), <i>raw2tiff</i>(1), <i>ras2tiff</i>(1),
<i>sgi2tiff</i>(1), <i>libtiff</i>(3TIFF)</p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,141 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>GIF2TIFF</title>
</head>
<body>
<h1 align=center>GIF2TIFF</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#NOTES">NOTES</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>gif2tiff &minus; create a <small>TIFF</small> file from a
GIF87 format image file</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>gif2tiff</b> [ <i>options</i> ] <i>input.gif
output.tif</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>Gif2tiff</i> converts a file in the GIF87 format to
<small>TIFF.</small> The <small>TIFF</small> image is
created as a palette image, with samples compressed with the
Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5).
These characteristics can overridden, or explicitly
specified with the options described below.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;c</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify a compression scheme to use when writing image
data: <b>&minus;c none</b> for no compression, <b>&minus;c
packbits</b> for the PackBits compression algorithm,
<b>&minus;c zip</b> for the Deflate compression algorithm,
and <b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch (the
default).</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;r</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Write data with a specified number of rows per strip; by
default the number of rows/strip is selected so that each
strip is approximately 8 kilobytes.</p>
</td>
<td width="0%">
</td>
</table>
<a name="NOTES"></a>
<h2>NOTES</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>The program is based on Paul Haeberli&rsquo;s
<i>fromgif</i> program which, in turn, is based on Marcel
J.E. Mol&rsquo;s GIF reader.</p>
</td>
</table>
<a name="BUGS"></a>
<h2>BUGS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>Should have more options to control output format.</p>
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>pal2rgb</b>(1), <b>tiffinfo</b>(1), <b>tiffcp</b>(1),
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff/</b></p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,139 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>RAS2TIFF</title>
</head>
<body>
<h1 align=center>RAS2TIFF</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>ras2tiff &minus; create a <small>TIFF</small> file from a
Sun rasterfile</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>ras2tiff</b> [ <i>options</i> ] <i>input.ras
output.tif</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>ras2tiff</i> converts a file in the Sun rasterfile
format to <small>TIFF.</small> By default, the
<small>TIFF</small> image is created with data samples
packed (<i>PlanarConfiguration</i>=1), compressed with the
Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5), and
with each strip no more than 8 kilobytes. These
characteristics can overridden, or explicitly specified with
the options described below.</p>
<!-- INDENTATION -->
<p>Any colormap information in the rasterfile is carried
over to the <small>TIFF</small> file by including a
<i>Colormap</i> tag in the output file. If the rasterfile
has a colormap, the <i>PhotometricInterpretation</i> tag is
set to 3 (palette); otherwise it is set to 2 (RGB) if the
depth is 24 or 1 (min-is-black) if the depth is not 24.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="2%">
<p><b>&minus;c</b></p>
</td>
<td width="6%"></td>
<td width="80%">
<p>Specify a compression scheme to use when writing image
data: <b>&minus;c none</b> for no compression, <b>&minus;c
packbits</b> for the PackBits compression algorithm,
<b>&minus;c jpeg</b> for the baseline JPEG compression
algorithm, <b>&minus;c zip</b> for the Deflate compression
algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
Welch (the default).</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="2%">
<p><b>&minus;r</b></p>
</td>
<td width="6%"></td>
<td width="80%">
<p>Write data with a specified number of rows per strip; by
default the number of rows/strip is selected so that each
strip is approximately 8 kilobytes.</p>
</td>
<td width="0%">
</td>
</table>
<a name="BUGS"></a>
<h2>BUGS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>Does not handle all possible rasterfiles. In particular,
<i>ras2tiff</i> does not handle run-length encoded
images.</p>
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>pal2rgb</b>(1), <b>tiffinfo</b>(1), <b>tiffcp</b>(1),
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff/</b></p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,155 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>RGB2YCBCR</title>
</head>
<body>
<h1 align=center>RGB2YCBCR</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>rgb2ycbcr &minus; convert non-YCbCr <small>TIFF</small>
images to a YCbCr <small>TIFF</small> image</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>rgb2ycbcr</b> [ <i>options</i> ] <i>src1.tif src2.tif
... dst.tif</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>rgb2ycbcr</i> converts <small>RGB</small> color,
greyscale, or bi-level <small>TIFF</small> images to YCbCr
images by transforming and sampling pixel data. If multiple
files are specified on the command line each source file is
converted to a separate directory in the destination
file.</p>
<!-- INDENTATION -->
<p>By default, chrominance samples are created by sampling 2
by 2 blocks of luminance values; this can be changed with
the <b>&minus;h</b> and <b>&minus;v</b> options. Output data
are compressed with the <small>PackBits</small> compression
scheme, by default; an alternate scheme can be selected with
the <b>&minus;c</b> option. By default, output data are
compressed in strips with the number of rows in each strip
selected so that the size of a strip is never more than 8
kilobytes; the <b>&minus;r</b> option can be used to
explicitly set the number of rows per strip.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;c</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify a compression scheme to use when writing image
data: <b>&minus;c none</b> for no compression, <b>&minus;c
packbits</b> for the PackBits compression algorithm (the
default), <b>&minus;c jpeg</b> for the JPEG compression
algorithm, <b>&minus;c zip</b> for the deflate compression
algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
Welch.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;h</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Set the horizontal sampling dimension to one of: 1, 2
(default), or 4.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;r</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Write data with a specified number of rows per strip; by
default the number of rows/strip is selected so that each
strip is approximately 8 kilobytes.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;v</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Set the vertical sampling dimension to one of: 1, 2
(default), or 4.</p>
</td>
<td width="0%">
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>tiffinfo</b>(1), <b>tiffcp</b>(1),
<b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff</b></p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,147 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>SGI2TIFF</title>
</head>
<body>
<h1 align=center>SGI2TIFF</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>sgi2tiff &minus; create a <small>TIFF</small> file from
an <small>SGI</small> image file</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>sgi2tiff</b> [ <i>options</i> ] <i>input.rgb
output.tif</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>sgi2tiff</i> converts a file in the <small>SGI</small>
image format to <small>TIFF.</small> By default, the
<small>TIFF</small> image is created with data samples
packed (<i>PlanarConfiguration</i>=1), compressed with the
Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5), and
with each strip no more than 8 kilobytes. These
characteristics can overridden, or explicitly specified with
the options described below.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;c</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify a compression scheme to use when writing image
data: <b>&minus;c none</b> for no compression, <b>&minus;c
packbits</b> for the PackBits compression algorithm),
<b>&minus;c jpeg</b> for the baseline JPEG compression
algorithm, <b>&minus;c zip</b> for the Deflate compression
algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
Welch (the default).</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;p</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Explicitly select the planar configuration used in
organizing data samples in the output image: <b>&minus;p
contig</b> for samples packed contiguously, and <b>&minus;p
separate</b> for samples stored separately. By default
samples are packed.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;r</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Write data with a specified number of rows per strip; by
default the number of rows/strip is selected so that each
strip is approximately 8 kilobytes.</p>
</td>
<td width="0%">
</td>
</table>
<a name="BUGS"></a>
<h2>BUGS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>Does not record colormap information.</p>
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>tiffinfo</b>(1), <b>tiffcp</b>(1),
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff/</b></p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,148 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>THUMBNAIL</title>
</head>
<body>
<h1 align=center>THUMBNAIL</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>thumbnail &minus; create a <small>TIFF</small> file with
thumbnail images</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>thumbnail</b> [ <i>options</i> ] <i>input.tif
output.tif</i></p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>thumbnail</i> is a program written to show how one
might use the SubIFD tag (#330) to store thumbnail images.
<i>thumbnail</i> copies a <small>TIFF</small> Class F
facsimile file to the output file and for each image an
8-bit greyscale <i>thumbnail sketch</i>. The output file
contains the thumbnail image with the associated
full-resolution page linked below with the SubIFD tag.</p>
<!-- INDENTATION -->
<p>By default, thumbnail images are 216 pixels wide by 274
pixels high. Pixels are calculated by sampling and filtering
the input image with each pixel value passed through a
contrast curve.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;w</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify the width of thumbnail images in pixels.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;h</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify the height of thumbnail images in pixels.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;c</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify a contrast curve to apply in generating the
thumbnail images. By default pixels values are passed
through a linear contrast curve that simply maps the pixel
value ranges. Alternative curves are: <b>exp50</b> for a 50%
exponential curve, <b>exp60</b> for a 60% exponential curve,
<b>exp70</b> for a 70% exponential curve, <b>exp80</b> for a
80% exponential curve, <b>exp90</b> for a 90% exponential
curve, <b>exp</b> for a pure exponential curve,
<b>linear</b> for a linear curve.</p>
</td>
<td width="0%">
</td>
</table>
<a name="BUGS"></a>
<h2>BUGS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>There are no options to control the format of the saved
thumbnail images.</p>
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>tiffdump</b>(1), <b>tiffgt</b>(1), <b>tiffinfo</b>(1),
<b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff/</b></p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,207 +0,0 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 24 18:37:20 2007 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>TIFFSV</title>
</head>
<body>
<h1 align=center>TIFFSV</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#NOTE">NOTE</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<a name="NAME"></a>
<h2>NAME</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>tiffsv &minus; save an image from the framebuffer in a
<small>TIFF</small> file (Silicon Graphics version)</p>
</td>
</table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>tiffsv</b> [ <i>options</i> ] <i>output.tif</i> [
<i>x1 x2 y1 y2</i> ]</p>
</td>
</table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><i>tiffsv</i> saves all or part of the framebuffer in a
file using the Tag Image File Format, Revision 6.0. By
default, the image is saved with data samples packed
(<i>PlanarConfiguration</i>=1), compressed with the
Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5), and
with each strip no more than 8 kilobytes. These
characteristics can be overridden, or explicitly specified
with the options described below.</p>
</td>
</table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;b</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Save the image as a greyscale image as if it were
processed by <i>tiff2bw</i>(1). This option is included for
compatibility with the standard <i>scrsave</i>(6D)
program.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;c</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify the compression to use for data written to the
output file: <b>none</b> for no compression, <b>packbits</b>
for PackBits compression, <b>jpeg</b> for baseline JPEG
compression, <b>zip</b> for Deflate compression, and
<b>lzw</b> for Lempel-Ziv &amp; Welch compression
(default).</p>
</td>
<td width="0%">
</td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="17%"></td>
<td width="82%">
<p><small>LZW</small> compression can be specified together
with a <i>predictor</i> value. A predictor value of 2 causes
each scanline of the output image to undergo horizontal
differencing before it is encoded; a value of 1 forces each
scanline to be encoded without differencing. LZW-specific
options are specified by appending a
&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
&lsquo;&lsquo;lzw&rsquo;&rsquo; option; e.g. <b>&minus;c
lzw:2</b> for <small>LZW</small> compression with horizontal
differencing.</p>
</td>
</table>
<!-- TABS -->
<table width="100%" border=0 rules="none" frame="void"
cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;p</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify the planar configuration to use in writing image
data. By default, <i>tiffsv</i> will create a new file with
the data samples packed contiguously. Specifying <b>&minus;p
contig</b> will force data to be written with multi-sample
data packed together, while <b>&minus;p separate</b> will
force samples to be written in separate planes.</p>
</td>
<td width="0%">
</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
<p><b>&minus;r</b></p>
</td>
<td width="5%"></td>
<td width="80%">
<p>Specify the number of rows (scanlines) in each strip of
data written to the output file. By default, <i>tiffsv</i>
attempts to set the rows/strip that no more than 8 kilobytes
of data appear in a strip.</p>
</td>
<td width="0%">
</td>
</table>
<a name="NOTE"></a>
<h2>NOTE</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>Except for the use of <small>TIFF,</small> this program
is equivalent to the standard <i>scrsave</i> program. This
means, for example, that you can use it in conjunction with
the standard <i>icut</i> program simply by creating a link
called <i>scrsave</i>, or by creating a shell script called
<i>scrsave</i> that invokes <i>tiffgt</i> with the
appropriate options.</p>
</td>
</table>
<a name="BUGS"></a>
<h2>BUGS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p>If data are saved compressed and in separate planes, then
the rows in each strip is silently set to one to avoid
limitations in the <b>libtiff</b>(3TIFF) library.</p>
</td>
</table>
<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="91%">
<p><b>scrsave</b>(6D) <b>pal2rgb</b>(1), <b>tiffdump</b>(1),
<b>tiffgt</b>(1), <b>tiffinfo</b>(1), <b>tiffcp</b>(1),
<b>tiffmedian</b>(1), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
<b>http://www.remotesensing.org/libtiff/</b></p>
</td>
</table>
<hr>
</body>
</html>

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:89c01765c3108dfd6e3ebf793250a3da123193c7a1c256ed785a42a72157fcd4
size 3293724

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65fc3676ea3f1716639cd80a50921134fc148227bb27448fa195fef30219053e
size 3307736

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:04fbb1f045853101f78076eac6773718237dfb89dabf712217528f5bf018a88f
size 1730990

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79ec3503f8654a7bd7feabe7f62617be2b5eca7a03820630ecab6c99b890ffc7
size 1963882

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a7941d8d8a8278ea62ead65f63af9bce7801614ee2e5f629ca107a14fc60594
size 6199378

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:931554a80f424a46e248c3f7f95ac3ee039b3f54e0f379ef1aab04462e715f86
size 6227900

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10f1b5baecb1e850ca8994e4f6f4347f9426ddb77b841178ee734fb609c0370f
size 2094704

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c4dfbbc0a9446626227bd6ea2a930b5b3dc83d2295c08459bc3b6f6920e288d7
size 1859564

View file

@ -1,118 +0,0 @@
/* $Id: tif_flush.c,v 1.9 2010-03-31 06:40:10 fwarmerdam Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
/*
* TIFF Library.
*/
#include "tiffiop.h"
int
TIFFFlush(TIFF* tif)
{
if( tif->tif_mode == O_RDONLY )
return 1;
if (!TIFFFlushData(tif))
return (0);
/* In update (r+) mode we try to detect the case where
only the strip/tile map has been altered, and we try to
rewrite only that portion of the directory without
making any other changes */
if( (tif->tif_flags & TIFF_DIRTYSTRIP)
&& !(tif->tif_flags & TIFF_DIRTYDIRECT)
&& tif->tif_mode == O_RDWR )
{
uint64 *offsets=NULL, *sizes=NULL;
if( TIFFIsTiled(tif) )
{
if( TIFFGetField( tif, TIFFTAG_TILEOFFSETS, &offsets )
&& TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &sizes )
&& _TIFFRewriteField( tif, TIFFTAG_TILEOFFSETS, TIFF_LONG8,
tif->tif_dir.td_nstrips, offsets )
&& _TIFFRewriteField( tif, TIFFTAG_TILEBYTECOUNTS, TIFF_LONG8,
tif->tif_dir.td_nstrips, sizes ) )
{
tif->tif_flags &= ~TIFF_DIRTYSTRIP;
tif->tif_flags &= ~TIFF_BEENWRITING;
return 1;
}
}
else
{
if( TIFFGetField( tif, TIFFTAG_STRIPOFFSETS, &offsets )
&& TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &sizes )
&& _TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8,
tif->tif_dir.td_nstrips, offsets )
&& _TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8,
tif->tif_dir.td_nstrips, sizes ) )
{
tif->tif_flags &= ~TIFF_DIRTYSTRIP;
tif->tif_flags &= ~TIFF_BEENWRITING;
return 1;
}
}
}
if ((tif->tif_flags & (TIFF_DIRTYDIRECT|TIFF_DIRTYSTRIP))
&& !TIFFRewriteDirectory(tif))
return (0);
return (1);
}
/*
* Flush buffered data to the file.
*
* Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING
* is not set, so that TIFFFlush() will proceed to write out the directory.
* The documentation says returning 1 is an error indicator, but not having
* been writing isn't exactly a an error. Hopefully this doesn't cause
* problems for other people.
*/
int
TIFFFlushData(TIFF* tif)
{
if ((tif->tif_flags & TIFF_BEENWRITING) == 0)
return (1);
if (tif->tif_flags & TIFF_POSTENCODE) {
tif->tif_flags &= ~TIFF_POSTENCODE;
if (!(*tif->tif_postencode)(tif))
return (0);
}
return (TIFFFlushData1(tif));
}
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,469 +0,0 @@
/* $Id: tif_zip.c,v 1.31 2011-01-06 16:00:23 fwarmerdam Exp $ */
/*
* Copyright (c) 1995-1997 Sam Leffler
* Copyright (c) 1995-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include "tiffiop.h"
#ifdef ZIP_SUPPORT
/*
* TIFF Library.
*
* ZIP (aka Deflate) Compression Support
*
* This file is simply an interface to the zlib library written by
* Jean-loup Gailly and Mark Adler. You must use version 1.0 or later
* of the library: this code assumes the 1.0 API and also depends on
* the ability to write the zlib header multiple times (one per strip)
* which was not possible with versions prior to 0.95. Note also that
* older versions of this codec avoided this bug by supressing the header
* entirely. This means that files written with the old library cannot
* be read; they should be converted to a different compression scheme
* and then reconverted.
*
* The data format used by the zlib library is described in the files
* zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the
* directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library was
* last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
*/
#include "tif_predict.h"
#include "zlib.h"
#include <stdio.h>
/*
* Sigh, ZLIB_VERSION is defined as a string so there's no
* way to do a proper check here. Instead we guess based
* on the presence of #defines that were added between the
* 0.95 and 1.0 distributions.
*/
#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED)
#error "Antiquated ZLIB software; you must use version 1.0 or later"
#endif
/*
* State block for each open TIFF
* file using ZIP compression/decompression.
*/
typedef struct {
TIFFPredictorState predict;
z_stream stream;
int zipquality; /* compression level */
int state; /* state flags */
#define ZSTATE_INIT_DECODE 0x01
#define ZSTATE_INIT_ENCODE 0x02
TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */
} ZIPState;
#define ZState(tif) ((ZIPState*) (tif)->tif_data)
#define DecoderState(tif) ZState(tif)
#define EncoderState(tif) ZState(tif)
static int ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s);
static int ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s);
static int
ZIPFixupTags(TIFF* tif)
{
(void) tif;
return (1);
}
static int
ZIPSetupDecode(TIFF* tif)
{
static const char module[] = "ZIPSetupDecode";
ZIPState* sp = DecoderState(tif);
assert(sp != NULL);
/* if we were last encoding, terminate this mode */
if (sp->state & ZSTATE_INIT_ENCODE) {
deflateEnd(&sp->stream);
sp->state = 0;
}
if (inflateInit(&sp->stream) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg);
return (0);
} else {
sp->state |= ZSTATE_INIT_DECODE;
return (1);
}
}
/*
* Setup state for decoding a strip.
*/
static int
ZIPPreDecode(TIFF* tif, uint16 s)
{
static const char module[] = "ZIPPreDecode";
ZIPState* sp = DecoderState(tif);
(void) s;
assert(sp != NULL);
if( (sp->state & ZSTATE_INIT_DECODE) == 0 )
tif->tif_setupdecode( tif );
sp->stream.next_in = tif->tif_rawdata;
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
apropriately even before we simplify it */
sp->stream.avail_in = (uInt) tif->tif_rawcc;
if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc)
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
return (0);
}
return (inflateReset(&sp->stream) == Z_OK);
}
static int
ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
{
static const char module[] = "ZIPDecode";
ZIPState* sp = DecoderState(tif);
(void) s;
assert(sp != NULL);
assert(sp->state == ZSTATE_INIT_DECODE);
sp->stream.next_in = tif->tif_rawcp;
sp->stream.avail_in = (uInt) tif->tif_rawcc;
sp->stream.next_out = op;
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
apropriately even before we simplify it */
sp->stream.avail_out = (uInt) occ;
if ((tmsize_t)sp->stream.avail_out != occ)
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
return (0);
}
do {
int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
if (state == Z_STREAM_END)
break;
if (state == Z_DATA_ERROR) {
TIFFErrorExt(tif->tif_clientdata, module,
"Decoding error at scanline %lu, %s",
(unsigned long) tif->tif_row, sp->stream.msg);
if (inflateSync(&sp->stream) != Z_OK)
return (0);
continue;
}
if (state != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
sp->stream.msg);
return (0);
}
} while (sp->stream.avail_out > 0);
if (sp->stream.avail_out != 0) {
TIFFErrorExt(tif->tif_clientdata, module,
"Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT " bytes)",
(unsigned long) tif->tif_row, (TIFF_UINT64_T) sp->stream.avail_out);
return (0);
}
tif->tif_rawcp = sp->stream.next_in;
tif->tif_rawcc = sp->stream.avail_in;
return (1);
}
static int
ZIPSetupEncode(TIFF* tif)
{
static const char module[] = "ZIPSetupEncode";
ZIPState* sp = EncoderState(tif);
assert(sp != NULL);
if (sp->state & ZSTATE_INIT_DECODE) {
inflateEnd(&sp->stream);
sp->state = 0;
}
if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg);
return (0);
} else {
sp->state |= ZSTATE_INIT_ENCODE;
return (1);
}
}
/*
* Reset encoding state at the start of a strip.
*/
static int
ZIPPreEncode(TIFF* tif, uint16 s)
{
static const char module[] = "ZIPPreEncode";
ZIPState *sp = EncoderState(tif);
(void) s;
assert(sp != NULL);
if( sp->state != ZSTATE_INIT_ENCODE )
tif->tif_setupencode( tif );
sp->stream.next_out = tif->tif_rawdata;
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
apropriately even before we simplify it */
sp->stream.avail_out = tif->tif_rawdatasize;
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
return (0);
}
return (deflateReset(&sp->stream) == Z_OK);
}
/*
* Encode a chunk of pixels.
*/
static int
ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
static const char module[] = "ZIPEncode";
ZIPState *sp = EncoderState(tif);
assert(sp != NULL);
assert(sp->state == ZSTATE_INIT_ENCODE);
(void) s;
sp->stream.next_in = bp;
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
apropriately even before we simplify it */
sp->stream.avail_in = (uInt) cc;
if ((tmsize_t)sp->stream.avail_in != cc)
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
return (0);
}
do {
if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "Encoder error: %s",
sp->stream.msg);
return (0);
}
if (sp->stream.avail_out == 0) {
tif->tif_rawcc = tif->tif_rawdatasize;
TIFFFlushData1(tif);
sp->stream.next_out = tif->tif_rawdata;
sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */
}
} while (sp->stream.avail_in > 0);
return (1);
}
/*
* Finish off an encoded strip by flushing the last
* string and tacking on an End Of Information code.
*/
static int
ZIPPostEncode(TIFF* tif)
{
static const char module[] = "ZIPPostEncode";
ZIPState *sp = EncoderState(tif);
int state;
sp->stream.avail_in = 0;
do {
state = deflate(&sp->stream, Z_FINISH);
switch (state) {
case Z_STREAM_END:
case Z_OK:
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
{
tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out;
TIFFFlushData1(tif);
sp->stream.next_out = tif->tif_rawdata;
sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */
}
break;
default:
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
sp->stream.msg);
return (0);
}
} while (state != Z_STREAM_END);
return (1);
}
static void
ZIPCleanup(TIFF* tif)
{
ZIPState* sp = ZState(tif);
assert(sp != 0);
(void)TIFFPredictorCleanup(tif);
tif->tif_tagmethods.vgetfield = sp->vgetparent;
tif->tif_tagmethods.vsetfield = sp->vsetparent;
if (sp->state & ZSTATE_INIT_ENCODE) {
deflateEnd(&sp->stream);
sp->state = 0;
} else if( sp->state & ZSTATE_INIT_DECODE) {
inflateEnd(&sp->stream);
sp->state = 0;
}
_TIFFfree(sp);
tif->tif_data = NULL;
_TIFFSetDefaultCompressionState(tif);
}
static int
ZIPVSetField(TIFF* tif, uint32 tag, va_list ap)
{
static const char module[] = "ZIPVSetField";
ZIPState* sp = ZState(tif);
switch (tag) {
case TIFFTAG_ZIPQUALITY:
sp->zipquality = (int) va_arg(ap, int);
if ( sp->state&ZSTATE_INIT_ENCODE ) {
if (deflateParams(&sp->stream,
sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
sp->stream.msg);
return (0);
}
}
return (1);
default:
return (*sp->vsetparent)(tif, tag, ap);
}
/*NOTREACHED*/
}
static int
ZIPVGetField(TIFF* tif, uint32 tag, va_list ap)
{
ZIPState* sp = ZState(tif);
switch (tag) {
case TIFFTAG_ZIPQUALITY:
*va_arg(ap, int*) = sp->zipquality;
break;
default:
return (*sp->vgetparent)(tif, tag, ap);
}
return (1);
}
static const TIFFField zipFields[] = {
{ TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL },
};
int
TIFFInitZIP(TIFF* tif, int scheme)
{
static const char module[] = "TIFFInitZIP";
ZIPState* sp;
assert( (scheme == COMPRESSION_DEFLATE)
|| (scheme == COMPRESSION_ADOBE_DEFLATE));
/*
* Merge codec-specific tag information.
*/
if (!_TIFFMergeFields(tif, zipFields, TIFFArrayCount(zipFields))) {
TIFFErrorExt(tif->tif_clientdata, module,
"Merging Deflate codec-specific tags failed");
return 0;
}
/*
* Allocate state block so tag methods have storage to record values.
*/
tif->tif_data = (uint8*) _TIFFmalloc(sizeof (ZIPState));
if (tif->tif_data == NULL)
goto bad;
sp = ZState(tif);
sp->stream.zalloc = NULL;
sp->stream.zfree = NULL;
sp->stream.opaque = NULL;
sp->stream.data_type = Z_BINARY;
/*
* Override parent get/set field methods.
*/
sp->vgetparent = tif->tif_tagmethods.vgetfield;
tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_tagmethods.vsetfield;
tif->tif_tagmethods.vsetfield = ZIPVSetField; /* hook for codec tags */
/* Default values for codec-specific fields */
sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */
sp->state = 0;
/*
* Install codec methods.
*/
tif->tif_fixuptags = ZIPFixupTags;
tif->tif_setupdecode = ZIPSetupDecode;
tif->tif_predecode = ZIPPreDecode;
tif->tif_decoderow = ZIPDecode;
tif->tif_decodestrip = ZIPDecode;
tif->tif_decodetile = ZIPDecode;
tif->tif_setupencode = ZIPSetupEncode;
tif->tif_preencode = ZIPPreEncode;
tif->tif_postencode = ZIPPostEncode;
tif->tif_encoderow = ZIPEncode;
tif->tif_encodestrip = ZIPEncode;
tif->tif_encodetile = ZIPEncode;
tif->tif_cleanup = ZIPCleanup;
/*
* Setup predictor setup.
*/
(void) TIFFPredictorInit(tif);
return (1);
bad:
TIFFErrorExt(tif->tif_clientdata, module,
"No space for ZIP state block");
return (0);
}
#endif /* ZIP_SUPORT */
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,85 +0,0 @@
.\" $Id: bmp2tiff.1,v 1.7 2006-04-20 12:17:19 dron Exp $
.\"
.\" Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH BMP2TIFF 1 "15 October, 2004" "libtiff"
.SH NAME
bmp2tiff \- create a
.SM TIFF
file from a Microsoft Windows Device Independent Bitmap image file
.SH SYNOPSIS
.B bmp2tiff
[
.I options
]
.I input.bmp
[
.I input2.bmp ...\&
]
.I output.tiff
.SH DESCRIPTION
.I bmp2tiff
converts a Microsoft Windows Device Independent Bitmap image file to
.SM TIFF.
If several input BMP files are being specified the multipage
.SM TIFF
output file will be created. By default, the
.SM TIFF
image is created with data samples packed (\c
.IR PlanarConfiguration =1),
compressed with the PackBits algorithm (\c
.IR Compression =32773),
and with each strip no more than 8 kilobytes.
These characteristics can overridden, or explicitly specified
with the options described below.
.SH OPTIONS
.TP
.B \-c
Specify a compression scheme to use when writing image data:
.B "\-c none"
for no compression,
.B "\-c packbits"
for the PackBits compression algorithm (the default),
.B "\-c jpeg"
for the baseline JPEG compression algorithm,
.B "\-c zip"
for the Deflate compression algorithm,
and
.B "\-c lzw"
for Lempel-Ziv & Welch.
.TP
.BI \-r " number"
Write data with a specified number of rows per strip;
by default the number of rows/strip is selected so that each strip
is approximately 8 kilobytes.
.SH "SEE ALSO"
.BR gif2tiff (1),
.BR pal2rgb (1),
.BR ppm2tiff (1),
.BR raw2tiff (1),
.BR ras2tiff (1),
.BR sgi2tiff (1),
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff/

View file

@ -1,81 +0,0 @@
.\" $Id: gif2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH GIF2TIFF 1 "November 2, 2005" "libtiff"
.SH NAME
gif2tiff \- create a
.SM TIFF
file from a GIF87 format image file
.SH SYNOPSIS
.B gif2tiff
[
.I options
]
.I input.gif
.I output.tif
.SH DESCRIPTION
.I Gif2tiff
converts a file in the GIF87 format to
.SM TIFF.
The
.SM TIFF
image is created as a palette image, with samples
compressed with the Lempel-Ziv & Welch algorithm (\c
.IR Compression =5).
These characteristics can overridden, or explicitly specified
with the options described below.
.SH OPTIONS
.TP
.B \-c
Specify a compression scheme to use when writing image data:
.B "\-c none"
for no compression,
.B "\-c packbits"
for the PackBits compression algorithm,
.B "\-c zip"
for the Deflate compression algorithm,
and
.B "\-c lzw"
for Lempel-Ziv & Welch (the default).
.TP
.B \-r
Write data with a specified number of rows per strip;
by default the number of rows/strip is selected so that each strip
is approximately 8 kilobytes.
.SH NOTES
The program is based on Paul Haeberli's
.I fromgif
program which, in turn, is based on Marcel J.E. Mol's GIF reader.
.SH BUGS
Should have more options to control output format.
.SH "SEE ALSO"
.BR pal2rgb (1),
.BR tiffinfo (1),
.BR tiffcp (1),
.BR tiffmedian (1),
.BR libtiff (3)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff/

View file

@ -1,96 +0,0 @@
.\" $Id: ras2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $
.\"
.\" Copyright (c) 1990-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH RAS2TIFF 1 "November 2, 2005" "libtiff"
.SH NAME
ras2tiff \- create a
.SM TIFF
file from a Sun rasterfile
.SH SYNOPSIS
.B ras2tiff
[
.I options
]
.I input.ras
.I output.tif
.SH DESCRIPTION
.I ras2tiff
converts a file in the Sun rasterfile format to
.SM TIFF.
By default, the
.SM TIFF
image is created with data samples packed (\c
.IR PlanarConfiguration =1),
compressed with the Lempel-Ziv & Welch algorithm (\c
.IR Compression =5),
and with each strip no more than 8 kilobytes.
These characteristics can overridden, or explicitly specified
with the options described below.
.PP
Any colormap information in the rasterfile is carried over to the
.SM TIFF
file by including a
.I Colormap
tag in the output file.
If the rasterfile has a colormap, the
.I PhotometricInterpretation
tag is set to 3 (palette);
otherwise it is set to 2 (RGB) if the depth
is 24 or 1 (min-is-black) if the depth is not 24.
.SH OPTIONS
.TP
.B \-c
Specify a compression scheme to use when writing image data:
.B "\-c none"
for no compression,
.B "\-c packbits"
for the PackBits compression algorithm,
.B "\-c jpeg"
for the baseline JPEG compression algorithm,
.B "\-c zip
for the Deflate compression algorithm,
and
.B "\-c lzw"
for Lempel-Ziv & Welch (the default).
.TP
.B \-r
Write data with a specified number of rows per strip;
by default the number of rows/strip is selected so that each strip
is approximately 8 kilobytes.
.SH BUGS
Does not handle all possible rasterfiles.
In particular,
.I ras2tiff
does not handle run-length encoded images.
.SH "SEE ALSO"
.BR pal2rgb (1),
.BR tiffinfo (1),
.BR tiffcp (1),
.BR tiffmedian (1),
.BR libtiff (3)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff/

View file

@ -1,99 +0,0 @@
.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.4 2006-04-20 12:17:19 dron Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH RGB2YCBCR 1 "November 2, 2005" "libtiff"
.SH NAME
rgb2ycbcr \- convert non-YCbCr
.SM TIFF
images to a YCbCr
.SM TIFF
image
.SH SYNOPSIS
.B rgb2ycbcr
[
.I options
]
.I "src1.tif src2.tif ... dst.tif"
.SH DESCRIPTION
.I rgb2ycbcr
converts
.SM RGB
color, greyscale, or bi-level
.SM TIFF
images to YCbCr images by transforming and sampling pixel data. If multiple
files are specified on the command line each source file is converted to a
separate directory in the destination file.
.PP
By default, chrominance samples are created by sampling
2 by 2 blocks of luminance values; this can be changed with the
.B \-h
and
.B \-v
options.
Output data are compressed with the
.SM PackBits
compression scheme, by default; an alternate scheme can be selected with the
.B \-c
option.
By default, output data are compressed in strips with
the number of rows in each strip selected so that the
size of a strip is never more than 8 kilobytes;
the
.B \-r
option can be used to explicitly set the number of
rows per strip.
.SH OPTIONS
.TP
.B \-c
Specify a compression scheme to use when writing image data:
.B "\-c none"
for no compression,
.B "\-c packbits"
for the PackBits compression algorithm (the default),
.B "\-c jpeg"
for the JPEG compression algorithm,
.B "\-c zip"
for the deflate compression algorithm,
and
.B "\-c lzw"
for Lempel-Ziv & Welch.
.TP
.B \-h
Set the horizontal sampling dimension to one of: 1, 2 (default), or 4.
.TP
.B \-r
Write data with a specified number of rows per strip;
by default the number of rows/strip is selected so that each strip
is approximately 8 kilobytes.
.TP
.B \-v
Set the vertical sampling dimension to one of: 1, 2 (default), or 4.
.SH "SEE ALSO"
.BR tiffinfo (1),
.BR tiffcp (1),
.BR libtiff (3)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff

View file

@ -1,93 +0,0 @@
.\" $Id: sgi2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH SGI2TIFF 1 "November 2, 2005" "libtiff"
.SH NAME
sgi2tiff \- create a
.SM TIFF
file from an
.SM SGI
image file
.SH SYNOPSIS
.B sgi2tiff
[
.I options
]
.I input.rgb
.I output.tif
.SH DESCRIPTION
.I sgi2tiff
converts a file in the
.SM SGI
image format to
.SM TIFF.
By default, the
.SM TIFF
image is created with data samples packed (\c
.IR PlanarConfiguration =1),
compressed with the Lempel-Ziv & Welch algorithm (\c
.IR Compression =5),
and with each strip no more than 8 kilobytes.
These characteristics can overridden, or explicitly specified
with the options described below.
.SH OPTIONS
.TP
.B \-c
Specify a compression scheme to use when writing image data:
.B "\-c none"
for no compression,
.B "\-c packbits"
for the PackBits compression algorithm),
.B "\-c jpeg"
for the baseline JPEG compression algorithm,
.B "\-c zip
for the Deflate compression algorithm,
and
.B "\-c lzw"
for Lempel-Ziv & Welch (the default).
.TP
.B \-p
Explicitly select the planar configuration used in organizing
data samples in the output image:
.B "\-p contig"
for samples packed contiguously, and
.B "\-p separate"
for samples stored separately.
By default samples are packed.
.TP
.B \-r
Write data with a specified number of rows per strip;
by default the number of rows/strip is selected so that each strip
is approximately 8 kilobytes.
.SH BUGS
Does not record colormap information.
.SH "SEE ALSO"
.BR tiffinfo (1),
.BR tiffcp (1),
.BR tiffmedian (1),
.BR libtiff (3)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff/

View file

@ -1,90 +0,0 @@
.\" $Id: thumbnail.1,v 1.2 2005-11-02 11:07:19 dron Exp $
.\"
.\" Copyright (c) 1994-1997 Sam Leffler
.\" Copyright (c) 1994-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH THUMBNAIL 1 "November 2, 2005" "libtiff"
.SH NAME
thumbnail \- create a
.SM TIFF
file with thumbnail images
.SH SYNOPSIS
.B thumbnail
[
.I options
]
.I input.tif
.I output.tif
.SH DESCRIPTION
.I thumbnail
is a program written to show how one might use the
SubIFD tag (#330) to store thumbnail images.
.I thumbnail
copies a
.SM TIFF
Class F facsimile file to the output file
and for each image an 8-bit greyscale
.IR "thumbnail sketch" .
The output file contains the thumbnail image with the associated
full-resolution page linked below with the SubIFD tag.
.PP
By default, thumbnail images are 216 pixels wide by 274 pixels high.
Pixels are calculated by sampling and filtering the input image
with each pixel value passed through a contrast curve.
.SH OPTIONS
.TP
.B \-w
Specify the width of thumbnail images in pixels.
.TP
.B \-h
Specify the height of thumbnail images in pixels.
.TP
.B \-c
Specify a contrast curve to apply in generating the thumbnail images.
By default pixels values are passed through a linear contrast curve
that simply maps the pixel value ranges.
Alternative curves are:
.B exp50
for a 50% exponential curve,
.B exp60
for a 60% exponential curve,
.B exp70
for a 70% exponential curve,
.B exp80
for a 80% exponential curve,
.B exp90
for a 90% exponential curve,
.B exp
for a pure exponential curve,
.B linear
for a linear curve.
.SH BUGS
There are no options to control the format of the saved thumbnail images.
.SH "SEE ALSO"
.BR tiffdump (1),
.BR tiffgt (1),
.BR tiffinfo (1),
.BR libtiff (3)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff/

View file

@ -1,142 +0,0 @@
.\" $Id: tiffsv.1,v 1.3 2005-11-02 11:07:19 dron Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\"
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH TIFFSV 1 "September 20, 2005" "libtiff"
.SH NAME
tiffsv \- save an image from the framebuffer in a
.SM TIFF
file (Silicon Graphics version)
.SH SYNOPSIS
.B tiffsv
[
.I options
]
.I output.tif
[
.I "x1 x2 y1 y2"
]
.SH DESCRIPTION
.I tiffsv
saves all or part of the framebuffer in a file using the
Tag Image File Format, Revision 6.0.
By default, the image is saved with data samples packed (\c
.IR PlanarConfiguration =1),
compressed with the Lempel-Ziv & Welch algorithm (\c
.IR Compression =5),
and with each strip no more than 8 kilobytes.
These characteristics can be overridden, or explicitly specified
with the options described below.
.SH OPTIONS
.TP
.B \-b
Save the image as a greyscale image
as if it were processed by
.IR tiff2bw (1).
This option is included for compatibility with the standard
.IR scrsave (6D)
program.
.TP
.B \-c
Specify the compression to use for data written to the output file:
.B none
for no compression,
.B packbits
for PackBits compression,
.B jpeg
for baseline JPEG compression,
.B zip
for Deflate compression,
and
.B lzw
for Lempel-Ziv & Welch compression (default).
.IP
.SM LZW
compression can be specified together with a
.I predictor
value.
A predictor value of 2 causes
each scanline of the output image to undergo horizontal
differencing before it is encoded; a value
of 1 forces each scanline to be encoded without differencing.
LZW-specific options are specified by appending a ``:''-separated
list to the ``lzw'' option; e.g.
.B "\-c lzw:2"
for
.SM LZW
compression with horizontal differencing.
.TP
.B \-p
Specify the planar configuration to use in writing image data.
By default,
.I tiffsv
will create a new file with the data samples packed contiguously.
Specifying
.B "\-p contig"
will force data to be written with multi-sample data packed
together, while
.B "\-p separate"
will force samples to be written in separate planes.
.TP
.B \-r
Specify the number of rows (scanlines) in each strip of data
written to the output file.
By default,
.I tiffsv
attempts to set the rows/strip
that no more than 8 kilobytes of data appear in a strip.
.SH NOTE
Except for the use of
.SM TIFF,
this program is equivalent to the standard
.I scrsave
program.
This means, for example, that you can use it in conjunction with
the standard
.IR icut
program simply by creating a link called
.IR scrsave ,
or by creating a shell script called
.I scrsave
that invokes
.I tiffgt
with the appropriate options.
.SH BUGS
If data are saved compressed and in separate planes, then the
rows in each strip is silently set to one to avoid limitations
in the
.BR libtiff (3TIFF)
library.
.SH "SEE ALSO"
.BR scrsave (6D)
.BR pal2rgb (1),
.BR tiffdump (1),
.BR tiffgt (1),
.BR tiffinfo (1),
.BR tiffcp (1),
.BR tiffmedian (1),
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
.BR http://www.remotesensing.org/libtiff/

View file

@ -1,116 +0,0 @@
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <limits.h>
#include <errno.h>
#include <ctype.h>
#include <stdlib.h>
/*
* Convert a string to an unsigned long long integer.
*
* Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
unsigned long long
strtoull(const char *nptr, char **endptr, int base)
{
const char *s;
unsigned long long acc;
char c;
unsigned long long cutoff;
int neg, any, cutlim;
/*
* See strtoq for comments as to the logic used.
*/
s = nptr;
do {
c = *s++;
} while (isspace((unsigned char)c));
if (c == '-') {
neg = 1;
c = *s++;
} else {
neg = 0;
if (c == '+')
c = *s++;
}
if ((base == 0 || base == 16) &&
c == '0' && (*s == 'x' || *s == 'X') &&
((s[1] >= '0' && s[1] <= '9') ||
(s[1] >= 'A' && s[1] <= 'F') ||
(s[1] >= 'a' && s[1] <= 'f'))) {
c = s[1];
s += 2;
base = 16;
}
if (base == 0)
base = c == '0' ? 8 : 10;
acc = any = 0;
if (base < 2 || base > 36)
goto noconv;
cutoff = ULLONG_MAX / base;
cutlim = ULLONG_MAX % base;
for ( ; ; c = *s++) {
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A' - 10;
else if (c >= 'a' && c <= 'z')
c -= 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
acc *= base;
acc += c;
}
}
if (any < 0) {
acc = ULLONG_MAX;
errno = ERANGE;
} else if (!any) {
noconv:
errno = EINVAL;
} else if (neg)
acc = -acc;
if (endptr != NULL)
*endptr = (char *)(any ? s - 1 : nptr);
return (acc);
}

View file

@ -1,7 +0,0 @@
#!/bin/sh
# Generated file, master is Makefile.am
. ${srcdir:-.}/common.sh
infile="$IMG_PALETTE_1C_8B_BMP"
outfile="o-bmp2tiff_palette.tiff"
f_test_convert "$BMP2TIFF" $infile $outfile
f_tiffinfo_validate $outfile

View file

@ -1,7 +0,0 @@
#!/bin/sh
# Generated file, master is Makefile.am
. ${srcdir:-.}/common.sh
infile="$IMG_RGB_3C_8B_BMP"
outfile="o-bmp2tiff_rgb.tiff"
f_test_convert "$BMP2TIFF" $infile $outfile
f_tiffinfo_validate $outfile

View file

@ -1,7 +0,0 @@
#!/bin/sh
# Generated file, master is Makefile.am
. ${srcdir:-.}/common.sh
infile="$IMG_PALETTE_1C_8B_GIF"
outfile="o-gif2tiff.tiff"
f_test_convert "$GIF2TIFF" $infile $outfile
f_tiffinfo_validate $outfile

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View file

@ -1,7 +0,0 @@
#!/bin/sh
# Generated file, master is Makefile.am
. ${srcdir:-.}/common.sh
infile="$IMG_RGB_3C_8B_PPM"
outfile="o-ppm2tiff_ppm.tiff"
f_test_convert "$PPM2TIFF" $infile $outfile
f_tiffinfo_validate $outfile

View file

@ -1,6 +0,0 @@
#!/bin/sh
#
# Basic sanity check for tiffps with PostScript Level 1 encapsulated output
#
. ${srcdir:-.}/common.sh
f_test_stdout "${TIFF2PS} -e -1" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-EPS1.ps"

View file

@ -1,6 +0,0 @@
#!/bin/sh
#
# Basic sanity check for tiffps with PostScript Level 1 output
#
. ${srcdir:-.}/common.sh
f_test_stdout "${TIFF2PS} -a -p -1" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS1.ps"

View file

@ -1,6 +0,0 @@
#!/bin/sh
#
# Basic sanity check for tiffps with PostScript Level 2 output
#
. ${srcdir:-.}/common.sh
f_test_stdout "${TIFF2PS} -a -p -2" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS2.ps"

View file

@ -1,6 +0,0 @@
#!/bin/sh
#
# Basic sanity check for tiffps with PostScript Level 3 output
#
. ${srcdir:-.}/common.sh
f_test_stdout "${TIFF2PS} -a -p -3" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS3.ps"

View file

@ -1,854 +0,0 @@
/* $Id: bmp2tiff.c,v 1.23 2010-03-10 18:56:49 bfriesen Exp $
*
* Project: libtiff tools
* Purpose: Convert Windows BMP files in TIFF.
* Author: Andrey Kiselev, dron@ak4719.spb.edu
*
******************************************************************************
* Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include "tif_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#if HAVE_FCNTL_H
# include <fcntl.h>
#endif
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_IO_H
# include <io.h>
#endif
#ifdef NEED_LIBPORT
# include "libport.h"
#endif
#include "tiffio.h"
#ifndef O_BINARY
# define O_BINARY 0
#endif
enum BMPType
{
BMPT_WIN4, /* BMP used in Windows 3.0/NT 3.51/95 */
BMPT_WIN5, /* BMP used in Windows NT 4.0/98/Me/2000/XP */
BMPT_OS21, /* BMP used in OS/2 PM 1.x */
BMPT_OS22 /* BMP used in OS/2 PM 2.x */
};
/*
* Bitmap file consists of a BMPFileHeader structure followed by a
* BMPInfoHeader structure. An array of BMPColorEntry structures (also called
* a colour table) follows the bitmap information header structure. The colour
* table is followed by a second array of indexes into the colour table (the
* actual bitmap data). Data may be comressed, for 4-bpp and 8-bpp used RLE
* compression.
*
* +---------------------+
* | BMPFileHeader |
* +---------------------+
* | BMPInfoHeader |
* +---------------------+
* | BMPColorEntry array |
* +---------------------+
* | Colour-index array |
* +---------------------+
*
* All numbers stored in Intel order with least significant byte first.
*/
enum BMPComprMethod
{
BMPC_RGB = 0L, /* Uncompressed */
BMPC_RLE8 = 1L, /* RLE for 8 bpp images */
BMPC_RLE4 = 2L, /* RLE for 4 bpp images */
BMPC_BITFIELDS = 3L, /* Bitmap is not compressed and the colour table
* consists of three DWORD color masks that specify
* the red, green, and blue components of each
* pixel. This is valid when used with
* 16- and 32-bpp bitmaps. */
BMPC_JPEG = 4L, /* Indicates that the image is a JPEG image. */
BMPC_PNG = 5L /* Indicates that the image is a PNG image. */
};
enum BMPLCSType /* Type of logical color space. */
{
BMPLT_CALIBRATED_RGB = 0, /* This value indicates that endpoints and
* gamma values are given in the appropriate
* fields. */
BMPLT_DEVICE_RGB = 1,
BMPLT_DEVICE_CMYK = 2
};
typedef struct
{
int32 iCIEX;
int32 iCIEY;
int32 iCIEZ;
} BMPCIEXYZ;
typedef struct /* This structure contains the x, y, and z */
{ /* coordinates of the three colors that */
/* correspond */
BMPCIEXYZ iCIERed; /* to the red, green, and blue endpoints for */
BMPCIEXYZ iCIEGreen; /* a specified logical color space. */
BMPCIEXYZ iCIEBlue;
} BMPCIEXYZTriple;
typedef struct
{
char bType[2]; /* Signature "BM" */
uint32 iSize; /* Size in bytes of the bitmap file. Should
* always be ignored while reading because
* of error in Windows 3.0 SDK's description
* of this field */
uint16 iReserved1; /* Reserved, set as 0 */
uint16 iReserved2; /* Reserved, set as 0 */
uint32 iOffBits; /* Offset of the image from file start in bytes */
} BMPFileHeader;
/* File header size in bytes: */
const int BFH_SIZE = 14;
typedef struct
{
uint32 iSize; /* Size of BMPInfoHeader structure in bytes.
* Should be used to determine start of the
* colour table */
int32 iWidth; /* Image width */
int32 iHeight; /* Image height. If positive, image has bottom
* left origin, if negative --- top left. */
int16 iPlanes; /* Number of image planes (must be set to 1) */
int16 iBitCount; /* Number of bits per pixel (1, 4, 8, 16, 24
* or 32). If 0 then the number of bits per
* pixel is specified or is implied by the
* JPEG or PNG format. */
uint32 iCompression; /* Compression method */
uint32 iSizeImage; /* Size of uncomressed image in bytes. May
* be 0 for BMPC_RGB bitmaps. If iCompression
* is BI_JPEG or BI_PNG, iSizeImage indicates
* the size of the JPEG or PNG image buffer. */
int32 iXPelsPerMeter; /* X resolution, pixels per meter (0 if not used) */
int32 iYPelsPerMeter; /* Y resolution, pixels per meter (0 if not used) */
uint32 iClrUsed; /* Size of colour table. If 0, iBitCount should
* be used to calculate this value
* (1<<iBitCount). This value should be
* unsigned for proper shifting. */
int32 iClrImportant; /* Number of important colours. If 0, all
* colours are required */
/*
* Fields above should be used for bitmaps, compatible with Windows NT 3.51
* and earlier. Windows 98/Me, Windows 2000/XP introduces additional fields:
*/
int32 iRedMask; /* Colour mask that specifies the red component
* of each pixel, valid only if iCompression
* is set to BI_BITFIELDS. */
int32 iGreenMask; /* The same for green component */
int32 iBlueMask; /* The same for blue component */
int32 iAlphaMask; /* Colour mask that specifies the alpha
* component of each pixel. */
uint32 iCSType; /* Colour space of the DIB. */
BMPCIEXYZTriple sEndpoints; /* This member is ignored unless the iCSType
* member specifies BMPLT_CALIBRATED_RGB. */
int32 iGammaRed; /* Toned response curve for red. This member
* is ignored unless color values are
* calibrated RGB values and iCSType is set to
* BMPLT_CALIBRATED_RGB. Specified
* in 16^16 format. */
int32 iGammaGreen; /* Toned response curve for green. */
int32 iGammaBlue; /* Toned response curve for blue. */
} BMPInfoHeader;
/*
* Info header size in bytes:
*/
const unsigned int BIH_WIN4SIZE = 40; /* for BMPT_WIN4 */
const unsigned int BIH_WIN5SIZE = 57; /* for BMPT_WIN5 */
const unsigned int BIH_OS21SIZE = 12; /* for BMPT_OS21 */
const unsigned int BIH_OS22SIZE = 64; /* for BMPT_OS22 */
/*
* We will use plain byte array instead of this structure, but declaration
* provided for reference
*/
typedef struct
{
char bBlue;
char bGreen;
char bRed;
char bReserved; /* Must be 0 */
} BMPColorEntry;
static uint16 compression = (uint16) -1;
static int jpegcolormode = JPEGCOLORMODE_RGB;
static int quality = 75; /* JPEG quality */
static uint16 predictor = 0;
static void usage(void);
static int processCompressOptions(char*);
static void rearrangePixels(char *, uint32, uint32);
int
main(int argc, char* argv[])
{
uint32 width, length;
uint16 nbands = 1; /* number of bands in input image */
uint16 depth = 8; /* bits per pixel in input image */
uint32 rowsperstrip = (uint32) -1;
uint16 photometric = PHOTOMETRIC_MINISBLACK;
int fd = 0;
struct stat instat;
char *outfilename = NULL, *infilename = NULL;
TIFF *out = NULL;
BMPFileHeader file_hdr;
BMPInfoHeader info_hdr;
int bmp_type;
uint32 clr_tbl_size, n_clr_elems = 3;
unsigned char *clr_tbl;
unsigned short *red_tbl = NULL, *green_tbl = NULL, *blue_tbl = NULL;
uint32 row, clr;
int c;
extern int optind;
extern char* optarg;
while ((c = getopt(argc, argv, "c:r:o:h")) != -1) {
switch (c) {
case 'c': /* compression scheme */
if (!processCompressOptions(optarg))
usage();
break;
case 'r': /* rows/strip */
rowsperstrip = atoi(optarg);
break;
case 'o':
outfilename = optarg;
break;
case 'h':
usage();
default:
break;
}
}
if (argc - optind < 2)
usage();
if (outfilename == NULL)
outfilename = argv[argc-1];
out = TIFFOpen(outfilename, "w");
if (out == NULL) {
TIFFError(infilename, "Cannot open file %s for output",
outfilename);
goto bad3;
}
while (optind < argc-1) {
infilename = argv[optind];
optind++;
fd = open(infilename, O_RDONLY|O_BINARY, 0);
if (fd < 0) {
TIFFError(infilename, "Cannot open input file");
return -1;
}
read(fd, file_hdr.bType, 2);
if(file_hdr.bType[0] != 'B' || file_hdr.bType[1] != 'M') {
TIFFError(infilename, "File is not BMP");
goto bad;
}
/* -------------------------------------------------------------------- */
/* Read the BMPFileHeader. We need iOffBits value only */
/* -------------------------------------------------------------------- */
lseek(fd, 10, SEEK_SET);
read(fd, &file_hdr.iOffBits, 4);
#ifdef WORDS_BIGENDIAN
TIFFSwabLong(&file_hdr.iOffBits);
#endif
fstat(fd, &instat);
file_hdr.iSize = instat.st_size;
/* -------------------------------------------------------------------- */
/* Read the BMPInfoHeader. */
/* -------------------------------------------------------------------- */
lseek(fd, BFH_SIZE, SEEK_SET);
read(fd, &info_hdr.iSize, 4);
#ifdef WORDS_BIGENDIAN
TIFFSwabLong(&info_hdr.iSize);
#endif
if (info_hdr.iSize == BIH_WIN4SIZE)
bmp_type = BMPT_WIN4;
else if (info_hdr.iSize == BIH_OS21SIZE)
bmp_type = BMPT_OS21;
else if (info_hdr.iSize == BIH_OS22SIZE
|| info_hdr.iSize == 16)
bmp_type = BMPT_OS22;
else
bmp_type = BMPT_WIN5;
if (bmp_type == BMPT_WIN4
|| bmp_type == BMPT_WIN5
|| bmp_type == BMPT_OS22) {
read(fd, &info_hdr.iWidth, 4);
read(fd, &info_hdr.iHeight, 4);
read(fd, &info_hdr.iPlanes, 2);
read(fd, &info_hdr.iBitCount, 2);
read(fd, &info_hdr.iCompression, 4);
read(fd, &info_hdr.iSizeImage, 4);
read(fd, &info_hdr.iXPelsPerMeter, 4);
read(fd, &info_hdr.iYPelsPerMeter, 4);
read(fd, &info_hdr.iClrUsed, 4);
read(fd, &info_hdr.iClrImportant, 4);
#ifdef WORDS_BIGENDIAN
TIFFSwabLong((uint32*) &info_hdr.iWidth);
TIFFSwabLong((uint32*) &info_hdr.iHeight);
TIFFSwabShort((uint16*) &info_hdr.iPlanes);
TIFFSwabShort((uint16*) &info_hdr.iBitCount);
TIFFSwabLong((uint32*) &info_hdr.iCompression);
TIFFSwabLong((uint32*) &info_hdr.iSizeImage);
TIFFSwabLong((uint32*) &info_hdr.iXPelsPerMeter);
TIFFSwabLong((uint32*) &info_hdr.iYPelsPerMeter);
TIFFSwabLong((uint32*) &info_hdr.iClrUsed);
TIFFSwabLong((uint32*) &info_hdr.iClrImportant);
#endif
n_clr_elems = 4;
}
if (bmp_type == BMPT_OS22) {
/*
* FIXME: different info in different documents
* regarding this!
*/
n_clr_elems = 3;
}
if (bmp_type == BMPT_OS21) {
int16 iShort;
read(fd, &iShort, 2);
#ifdef WORDS_BIGENDIAN
TIFFSwabShort((uint16*) &iShort);
#endif
info_hdr.iWidth = iShort;
read(fd, &iShort, 2);
#ifdef WORDS_BIGENDIAN
TIFFSwabShort((uint16*) &iShort);
#endif
info_hdr.iHeight = iShort;
read(fd, &iShort, 2);
#ifdef WORDS_BIGENDIAN
TIFFSwabShort((uint16*) &iShort);
#endif
info_hdr.iPlanes = iShort;
read(fd, &iShort, 2);
#ifdef WORDS_BIGENDIAN
TIFFSwabShort((uint16*) &iShort);
#endif
info_hdr.iBitCount = iShort;
info_hdr.iCompression = BMPC_RGB;
n_clr_elems = 3;
}
if (info_hdr.iBitCount != 1 && info_hdr.iBitCount != 4 &&
info_hdr.iBitCount != 8 && info_hdr.iBitCount != 16 &&
info_hdr.iBitCount != 24 && info_hdr.iBitCount != 32) {
TIFFError(infilename,
"Cannot process BMP file with bit count %d",
info_hdr.iBitCount);
close(fd);
return 0;
}
width = info_hdr.iWidth;
length = (info_hdr.iHeight > 0) ? info_hdr.iHeight : -info_hdr.iHeight;
switch (info_hdr.iBitCount)
{
case 1:
case 4:
case 8:
nbands = 1;
depth = info_hdr.iBitCount;
photometric = PHOTOMETRIC_PALETTE;
/* Allocate memory for colour table and read it. */
if (info_hdr.iClrUsed)
clr_tbl_size =
((uint32)(1<<depth)<info_hdr.iClrUsed)
? (uint32) (1 << depth)
: info_hdr.iClrUsed;
else
clr_tbl_size = 1 << depth;
clr_tbl = (unsigned char *)
_TIFFmalloc(n_clr_elems * clr_tbl_size);
if (!clr_tbl) {
TIFFError(infilename,
"Can't allocate space for color table");
goto bad;
}
lseek(fd, BFH_SIZE + info_hdr.iSize, SEEK_SET);
read(fd, clr_tbl, n_clr_elems * clr_tbl_size);
red_tbl = (unsigned short*)
_TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
if (!red_tbl) {
TIFFError(infilename,
"Can't allocate space for red component table");
_TIFFfree(clr_tbl);
goto bad1;
}
green_tbl = (unsigned short*)
_TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
if (!green_tbl) {
TIFFError(infilename,
"Can't allocate space for green component table");
_TIFFfree(clr_tbl);
goto bad2;
}
blue_tbl = (unsigned short*)
_TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
if (!blue_tbl) {
TIFFError(infilename,
"Can't allocate space for blue component table");
_TIFFfree(clr_tbl);
goto bad3;
}
for(clr = 0; clr < clr_tbl_size; clr++) {
red_tbl[clr] = 257*clr_tbl[clr*n_clr_elems+2];
green_tbl[clr] = 257*clr_tbl[clr*n_clr_elems+1];
blue_tbl[clr] = 257*clr_tbl[clr*n_clr_elems];
}
_TIFFfree(clr_tbl);
break;
case 16:
case 24:
nbands = 3;
depth = info_hdr.iBitCount / nbands;
photometric = PHOTOMETRIC_RGB;
break;
case 32:
nbands = 3;
depth = 8;
photometric = PHOTOMETRIC_RGB;
break;
default:
break;
}
/* -------------------------------------------------------------------- */
/* Create output file. */
/* -------------------------------------------------------------------- */
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
TIFFSetField(out, TIFFTAG_IMAGELENGTH, length);
TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, nbands);
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, depth);
TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
TIFFDefaultStripSize(out, rowsperstrip));
if (red_tbl && green_tbl && blue_tbl) {
TIFFSetField(out, TIFFTAG_COLORMAP,
red_tbl, green_tbl, blue_tbl);
}
if (compression == (uint16) -1)
compression = COMPRESSION_PACKBITS;
TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
switch (compression) {
case COMPRESSION_JPEG:
if (photometric == PHOTOMETRIC_RGB
&& jpegcolormode == JPEGCOLORMODE_RGB)
photometric = PHOTOMETRIC_YCBCR;
TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
break;
case COMPRESSION_LZW:
case COMPRESSION_DEFLATE:
if (predictor != 0)
TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
break;
}
/* -------------------------------------------------------------------- */
/* Read uncompressed image data. */
/* -------------------------------------------------------------------- */
if (info_hdr.iCompression == BMPC_RGB) {
uint32 offset, size;
char *scanbuf;
/* XXX: Avoid integer overflow. We can calculate size
* in one step using
*
* size = ((width * info_hdr.iBitCount + 31) & ~31) / 8
*
* formulae, but we should check for overflow
* conditions during calculation.
*/
size = width * info_hdr.iBitCount + 31;
if (!width || !info_hdr.iBitCount
|| (size - 31) / info_hdr.iBitCount != width ) {
TIFFError(infilename,
"Wrong image parameters; can't "
"allocate space for scanline buffer");
goto bad3;
}
size = (size & ~31) / 8;
scanbuf = (char *) _TIFFmalloc(size);
if (!scanbuf) {
TIFFError(infilename,
"Can't allocate space for scanline buffer");
goto bad3;
}
for (row = 0; row < length; row++) {
if (info_hdr.iHeight > 0)
offset = file_hdr.iOffBits+(length-row-1)*size;
else
offset = file_hdr.iOffBits + row * size;
if (lseek(fd, offset, SEEK_SET) == (off_t)-1) {
TIFFError(infilename,
"scanline %lu: Seek error",
(unsigned long) row);
break;
}
if (read(fd, scanbuf, size) < 0) {
TIFFError(infilename,
"scanline %lu: Read error",
(unsigned long) row);
break;
}
rearrangePixels(scanbuf, width, info_hdr.iBitCount);
if (TIFFWriteScanline(out, scanbuf, row, 0)<0) {
TIFFError(infilename,
"scanline %lu: Write error",
(unsigned long) row);
break;
}
}
_TIFFfree(scanbuf);
/* -------------------------------------------------------------------- */
/* Read compressed image data. */
/* -------------------------------------------------------------------- */
} else if ( info_hdr.iCompression == BMPC_RLE8
|| info_hdr.iCompression == BMPC_RLE4 ) {
uint32 i, j, k, runlength;
uint32 compr_size, uncompr_size;
unsigned char *comprbuf;
unsigned char *uncomprbuf;
compr_size = file_hdr.iSize - file_hdr.iOffBits;
uncompr_size = width * length;
comprbuf = (unsigned char *) _TIFFmalloc( compr_size );
if (!comprbuf) {
TIFFError(infilename,
"Can't allocate space for compressed scanline buffer");
goto bad3;
}
uncomprbuf = (unsigned char *)_TIFFmalloc(uncompr_size);
if (!uncomprbuf) {
TIFFError(infilename,
"Can't allocate space for uncompressed scanline buffer");
goto bad3;
}
lseek(fd, file_hdr.iOffBits, SEEK_SET);
read(fd, comprbuf, compr_size);
i = 0;
j = 0;
if (info_hdr.iBitCount == 8) { /* RLE8 */
while(j < uncompr_size && i < compr_size) {
if ( comprbuf[i] ) {
runlength = comprbuf[i++];
while( runlength > 0
&& j < uncompr_size
&& i < compr_size ) {
uncomprbuf[j++] = comprbuf[i];
runlength--;
}
i++;
} else {
i++;
if (comprbuf[i] == 0) /* Next scanline */
i++;
else if (comprbuf[i] == 1) /* End of image */
break;
else if (comprbuf[i] == 2) { /* Move to... */
i++;
if (i < compr_size - 1) {
j+=comprbuf[i]+comprbuf[i+1]*width;
i += 2;
}
else
break;
} else { /* Absolute mode */
runlength = comprbuf[i++];
for (k = 0; k < runlength && j < uncompr_size && i < compr_size; k++)
uncomprbuf[j++] = comprbuf[i++];
if ( k & 0x01 )
i++;
}
}
}
}
else { /* RLE4 */
while( j < uncompr_size && i < compr_size ) {
if ( comprbuf[i] ) {
runlength = comprbuf[i++];
while( runlength > 0 && j < uncompr_size && i < compr_size ) {
if ( runlength & 0x01 )
uncomprbuf[j++] = (comprbuf[i] & 0xF0) >> 4;
else
uncomprbuf[j++] = comprbuf[i] & 0x0F;
runlength--;
}
i++;
} else {
i++;
if (comprbuf[i] == 0) /* Next scanline */
i++;
else if (comprbuf[i] == 1) /* End of image */
break;
else if (comprbuf[i] == 2) { /* Move to... */
i++;
if (i < compr_size - 1) {
j+=comprbuf[i]+comprbuf[i+1]*width;
i += 2;
}
else
break;
} else { /* Absolute mode */
runlength = comprbuf[i++];
for (k = 0; k < runlength && j < uncompr_size && i < compr_size; k++) {
if (k & 0x01)
uncomprbuf[j++] = comprbuf[i++] & 0x0F;
else
uncomprbuf[j++] = (comprbuf[i] & 0xF0) >> 4;
}
if (k & 0x01)
i++;
}
}
}
}
_TIFFfree(comprbuf);
for (row = 0; row < length; row++) {
if (TIFFWriteScanline(out,
uncomprbuf + (length - row - 1) * width,
row, 0) < 0) {
TIFFError(infilename,
"scanline %lu: Write error.\n",
(unsigned long) row);
}
}
_TIFFfree(uncomprbuf);
}
TIFFWriteDirectory(out);
if (blue_tbl) {
_TIFFfree(blue_tbl);
blue_tbl=NULL;
}
if (green_tbl) {
_TIFFfree(green_tbl);
green_tbl=NULL;
}
if (red_tbl) {
_TIFFfree(red_tbl);
red_tbl=NULL;
}
}
bad3:
if (blue_tbl)
_TIFFfree(blue_tbl);
bad2:
if (green_tbl)
_TIFFfree(green_tbl);
bad1:
if (red_tbl)
_TIFFfree(red_tbl);
bad:
close(fd);
if (out)
TIFFClose(out);
return 0;
}
/*
* Image data in BMP file stored in BGR (or ABGR) format. We should rearrange
* pixels to RGB (RGBA) format.
*/
static void
rearrangePixels(char *buf, uint32 width, uint32 bit_count)
{
char tmp;
uint32 i;
switch(bit_count) {
case 16: /* FIXME: need a sample file */
break;
case 24:
for (i = 0; i < width; i++, buf += 3) {
tmp = *buf;
*buf = *(buf + 2);
*(buf + 2) = tmp;
}
break;
case 32:
{
char *buf1 = buf;
for (i = 0; i < width; i++, buf += 4) {
tmp = *buf;
*buf1++ = *(buf + 2);
*buf1++ = *(buf + 1);
*buf1++ = tmp;
}
}
break;
default:
break;
}
}
static int
processCompressOptions(char* opt)
{
if (strcmp(opt, "none") == 0)
compression = COMPRESSION_NONE;
else if (strcmp(opt, "packbits") == 0)
compression = COMPRESSION_PACKBITS;
else if (strncmp(opt, "jpeg", 4) == 0) {
char* cp = strchr(opt, ':');
compression = COMPRESSION_JPEG;
while( cp )
{
if (isdigit((int)cp[1]))
quality = atoi(cp+1);
else if (cp[1] == 'r' )
jpegcolormode = JPEGCOLORMODE_RAW;
else
usage();
cp = strchr(cp+1,':');
}
} else if (strncmp(opt, "lzw", 3) == 0) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_LZW;
} else if (strncmp(opt, "zip", 3) == 0) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_DEFLATE;
} else
return (0);
return (1);
}
static char* stuff[] = {
"bmp2tiff --- convert Windows BMP files to TIFF",
"usage: bmp2tiff [options] input.bmp [input2.bmp ...] output.tif",
"where options are:",
" -r # make each strip have no more than # rows",
"",
" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
" -c zip[:opts] compress output with deflate encoding",
" -c jpeg[:opts]compress output with JPEG encoding",
" -c packbits compress output with packbits encoding",
" -c none use no compression algorithm on output",
"",
"JPEG options:",
" # set compression quality level (0-100, default 75)",
" r output color image as RGB rather than YCbCr",
"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
"",
"LZW and deflate options:",
" # set predictor value",
"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
" -o out.tif write output to out.tif",
" -h this help message",
NULL
};
static void
usage(void)
{
char buf[BUFSIZ];
int i;
setbuf(stderr, buf);
fprintf(stderr, "%s\n\n", TIFFGetVersion());
for (i = 0; stuff[i] != NULL; i++)
fprintf(stderr, "%s\n", stuff[i]);
exit(-1);
}
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,530 +0,0 @@
/* $Id: gif2tiff.c,v 1.12 2010-12-15 00:22:44 faxguy Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
/*
* convert a GIF file into a TIFF file.
* based on Paul Haeberli's fromgif program which in turn is
* based on a GIF file reader by Marcel J.E. Mol March 23 1989
*
* if input is 320 by 200 pixel aspect is probably 1.2
* if input is 640 350 pixel aspect is probably 1.37
*
*/
#include "tif_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef NEED_LIBPORT
# include "libport.h"
#endif
#include "tiffio.h"
#define GIFGAMMA (1.5) /* smaller makes output img brighter */
#define IMAX 0xffff /* max intensity value */
#define EXTRAFUDGE 128 /* some people write BAD .gif files */
#define streq(a,b) (strcmp(a,b) == 0)
#define strneq(a,b,n) (strncmp(a,b,n) == 0)
unsigned short gamtab[256];
void
makegamtab(float gam)
{
int i;
for(i=0; i<256; i++)
gamtab[i] = (unsigned short) (IMAX*pow(i/255.0,gam)+0.5);
}
char* stuff[] = {
"usage: gif2tiff [options] input.gif output.tif",
"where options are:",
" -r # make each strip have no more than # rows",
"",
" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
" -c zip[:opts] compress output with deflate encoding",
" -c packbits compress output with packbits encoding",
" -c none use no compression algorithm on output",
"",
"LZW and deflate options:",
" # set predictor value",
"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
NULL
};
static void
usage(void)
{
char buf[BUFSIZ];
int i;
setbuf(stderr, buf);
fprintf(stderr, "%s\n\n", TIFFGetVersion());
for (i = 0; stuff[i] != NULL; i++)
fprintf(stderr, "%s\n", stuff[i]);
exit(-1);
}
#define COLSIZE 256
unsigned char *stackp;
unsigned int prefix[4096];
unsigned char suffix[4096];
unsigned char stack[4096];
int datasize,codesize,codemask; /* Decoder working variables */
int clear,eoi; /* Special code values */
int avail, oldcode;
FILE *infile;
int global; /* Is there a global color map? */
int globalbits; /* Number of bits of global colors */
unsigned char globalmap[COLSIZE][3];/* RGB values for global color map */
unsigned char *raster; /* Decoded image data */
unsigned long width, height;
unsigned short red[COLSIZE];
unsigned short green[COLSIZE];
unsigned short blue[COLSIZE];
char *filename, *imagename;
static uint16 compression = COMPRESSION_PACKBITS;
static uint16 predictor = 0;
static uint32 rowsperstrip = (uint32) -1;
static int processCompressOptions(char*);
int convert(void);
int checksignature(void);
void readscreen(void);
int readgifimage(char*);
void readextension(void);
int readraster(void);
int process(int, unsigned char**);
void initcolors(unsigned char [COLSIZE][3], int);
void rasterize(int, char*);
int
main(int argc, char* argv[])
{
extern int optind;
extern char *optarg;
int c, status;
while ((c = getopt(argc, argv, "c:r:")) != -1)
switch (c) {
case 'c': /* compression scheme */
if (!processCompressOptions(optarg))
usage();
break;
case 'r': /* rows/strip */
rowsperstrip = atoi(optarg);
break;
case '?':
usage();
/*NOTREACHED*/
}
if (argc - optind != 2)
usage();
makegamtab(GIFGAMMA);
filename = argv[optind];
imagename = argv[optind+1];
if ((infile = fopen(imagename, "rb")) != NULL) {
int c;
fclose(infile);
printf("overwrite %s? ", imagename); fflush(stdout);
c = getc(stdin);
if (c != 'y' && c != 'Y')
return (1);
}
if ((infile = fopen(filename, "rb")) == NULL) {
perror(filename);
return (1);
}
status = convert();
fclose(infile);
return (status);
}
static int
processCompressOptions(char* opt)
{
if (streq(opt, "none"))
compression = COMPRESSION_NONE;
else if (streq(opt, "packbits"))
compression = COMPRESSION_PACKBITS;
else if (strneq(opt, "lzw", 3)) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_LZW;
} else if (strneq(opt, "zip", 3)) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_DEFLATE;
} else
return (0);
return (1);
}
int
convert(void)
{
int ch;
char* mode = "w";
if (!checksignature())
return (-1);
readscreen();
while ((ch = getc(infile)) != ';' && ch != EOF) {
switch (ch) {
case '\0': break; /* this kludge for non-standard files */
case ',': if (!readgifimage(mode))
return (-1);
mode = "a"; /* subsequent images append */
break;
case '!': readextension();
break;
default: fprintf(stderr, "illegal GIF block type\n");
return (-1);
}
}
return (0);
}
int
checksignature(void)
{
char buf[6];
fread(buf,1,6,infile);
if (strncmp(buf,"GIF",3)) {
fprintf(stderr, "file is not a GIF file\n");
return 0;
}
if (strncmp(&buf[3],"87a",3)) {
fprintf(stderr, "unknown GIF version number\n");
return 0;
}
return 1;
}
/*
* readscreen -
* Get information which is global to all the images stored
* in the file
*/
void
readscreen(void)
{
unsigned char buf[7];
fread(buf,1,7,infile);
global = buf[4] & 0x80;
if (global) {
globalbits = (buf[4] & 0x07) + 1;
fread(globalmap,3,((size_t)1)<<globalbits,infile);
}
}
int
readgifimage(char* mode)
{
unsigned char buf[9];
int local, interleaved;
unsigned char localmap[256][3];
int localbits;
int status;
if (fread(buf, 1, 9, infile) == 0) {
perror(filename);
return (0);
}
width = buf[4] + (buf[5] << 8);
height = buf[6] + (buf[7] << 8);
local = buf[8] & 0x80;
interleaved = buf[8] & 0x40;
if (local == 0 && global == 0) {
fprintf(stderr, "no colormap present for image\n");
return (0);
}
if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
fprintf(stderr, "not enough memory for image\n");
return (0);
}
if (local) {
localbits = (buf[8] & 0x7) + 1;
fprintf(stderr, " local colors: %d\n", 1<<localbits);
fread(localmap, 3, ((size_t)1)<<localbits, infile);
initcolors(localmap, 1<<localbits);
} else if (global) {
initcolors(globalmap, 1<<globalbits);
}
if ((status = readraster()))
rasterize(interleaved, mode);
_TIFFfree(raster);
return status;
}
/*
* readextension -
* Read a GIF extension block (and do nothing with it).
*
*/
void
readextension(void)
{
int count;
char buf[255];
(void) getc(infile);
while ((count = getc(infile)))
fread(buf, 1, count, infile);
}
/*
* readraster -
* Decode a raster image
*
*/
int
readraster(void)
{
unsigned char *fill = raster;
unsigned char buf[255];
register int bits=0;
register unsigned long datum=0;
register unsigned char *ch;
register int count, code;
int status = 1;
datasize = getc(infile);
clear = 1 << datasize;
eoi = clear + 1;
avail = clear + 2;
oldcode = -1;
codesize = datasize + 1;
codemask = (1 << codesize) - 1;
for (code = 0; code < clear; code++) {
prefix[code] = 0;
suffix[code] = code;
}
stackp = stack;
for (count = getc(infile); count > 0; count = getc(infile)) {
fread(buf,1,count,infile);
for (ch=buf; count-- > 0; ch++) {
datum += (unsigned long) *ch << bits;
bits += 8;
while (bits >= codesize) {
code = datum & codemask;
datum >>= codesize;
bits -= codesize;
if (code == eoi) { /* This kludge put in */
goto exitloop; /* because some GIF files*/
} /* aren't standard */
if (!process(code, &fill)) {
status = 0;
goto exitloop;
}
}
}
if (fill >= raster + width*height) {
fprintf(stderr, "raster full before eoi code\n");
break;
}
}
exitloop:
if (fill != raster + width*height) {
fprintf(stderr, "warning: wrong rastersize: %ld bytes\n",
(long) (fill-raster));
fprintf(stderr, " instead of %ld bytes\n",
(long) width*height);
}
return status;
}
/*
* process -
* Process a compression code. "clear" resets the code table.
* Otherwise make a new code table entry, and output the bytes
* associated with the code.
*/
int
process(register int code, unsigned char** fill)
{
int incode;
static unsigned char firstchar;
if (code == clear) {
codesize = datasize + 1;
codemask = (1 << codesize) - 1;
avail = clear + 2;
oldcode = -1;
return 1;
}
if (oldcode == -1) {
*(*fill)++ = suffix[code];
firstchar = oldcode = code;
return 1;
}
if (code > avail) {
fprintf(stderr, "code %d too large for %d\n", code, avail);
return 0;
}
incode = code;
if (code == avail) { /* the first code is always < avail */
*stackp++ = firstchar;
code = oldcode;
}
while (code > clear) {
*stackp++ = suffix[code];
code = prefix[code];
}
*stackp++ = firstchar = suffix[code];
prefix[avail] = oldcode;
suffix[avail] = firstchar;
avail++;
if (((avail & codemask) == 0) && (avail < 4096)) {
codesize++;
codemask += avail;
}
oldcode = incode;
do {
*(*fill)++ = *--stackp;
} while (stackp > stack);
return 1;
}
/*
* initcolors -
* Convert a color map (local or global) to arrays with R, G and B
* values.
*
*/
void
initcolors(unsigned char colormap[COLSIZE][3], int ncolors)
{
register int i;
for (i = 0; i < ncolors; i++) {
red[i] = gamtab[colormap[i][0]];
green[i] = gamtab[colormap[i][1]];
blue[i] = gamtab[colormap[i][2]];
}
}
void
rasterize(int interleaved, char* mode)
{
register unsigned long row;
unsigned char *newras;
unsigned char *ras;
TIFF *tif;
tstrip_t strip;
tsize_t stripsize;
if ((newras = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
fprintf(stderr, "not enough memory for image\n");
return;
}
#define DRAWSEGMENT(offset, step) { \
for (row = offset; row < height; row += step) { \
_TIFFmemcpy(newras + row*width, ras, width);\
ras += width; \
} \
}
ras = raster;
if (interleaved) {
DRAWSEGMENT(0, 8);
DRAWSEGMENT(4, 8);
DRAWSEGMENT(2, 4);
DRAWSEGMENT(1, 2);
} else
DRAWSEGMENT(0, 1);
#undef DRAWSEGMENT
tif = TIFFOpen(imagename, mode);
if (!tif) {
TIFFError(imagename,"Can not open output image");
exit(-1);
}
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) width);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) height);
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,
rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip));
TIFFSetField(tif, TIFFTAG_COMPRESSION, compression);
switch (compression) {
case COMPRESSION_LZW:
case COMPRESSION_DEFLATE:
if (predictor != 0)
TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor);
break;
}
TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
strip = 0;
stripsize = TIFFStripSize(tif);
for (row=0; row<height; row += rowsperstrip) {
if (rowsperstrip > height-row) {
rowsperstrip = height-row;
stripsize = TIFFVStripSize(tif, rowsperstrip);
}
if (TIFFWriteEncodedStrip(tif, strip, newras+row*width, stripsize) < 0)
break;
strip++;
}
TIFFClose(tif);
_TIFFfree(newras);
}
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,316 +0,0 @@
/* $Id: ras2tiff.c,v 1.18 2010-03-10 18:56:49 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include "tif_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef NEED_LIBPORT
# include "libport.h"
#endif
#include "rasterfile.h"
#include "tiffio.h"
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#endif
#define streq(a,b) (strcmp(a,b) == 0)
#define strneq(a,b,n) (strncmp(a,b,n) == 0)
static uint16 compression = (uint16) -1;
static int jpegcolormode = JPEGCOLORMODE_RGB;
static int quality = 75; /* JPEG quality */
static uint16 predictor = 0;
static void usage(void);
static int processCompressOptions(char*);
int
main(int argc, char* argv[])
{
unsigned char* buf;
long row;
tsize_t linebytes, scanline;
TIFF *out;
FILE *in;
struct rasterfile h;
uint16 photometric;
uint16 config = PLANARCONFIG_CONTIG;
uint32 rowsperstrip = (uint32) -1;
int c;
extern int optind;
extern char* optarg;
while ((c = getopt(argc, argv, "c:r:h")) != -1)
switch (c) {
case 'c': /* compression scheme */
if (!processCompressOptions(optarg))
usage();
break;
case 'r': /* rows/strip */
rowsperstrip = atoi(optarg);
break;
case 'h':
usage();
/*NOTREACHED*/
}
if (argc - optind != 2)
usage();
in = fopen(argv[optind], "rb");
if (in == NULL) {
fprintf(stderr, "%s: Can not open.\n", argv[optind]);
return (-1);
}
if (fread(&h, sizeof (h), 1, in) != 1) {
fprintf(stderr, "%s: Can not read header.\n", argv[optind]);
fclose(in);
return (-2);
}
if (strcmp(h.ras_magic, RAS_MAGIC) == 0) {
#ifndef WORDS_BIGENDIAN
TIFFSwabLong((uint32 *)&h.ras_width);
TIFFSwabLong((uint32 *)&h.ras_height);
TIFFSwabLong((uint32 *)&h.ras_depth);
TIFFSwabLong((uint32 *)&h.ras_length);
TIFFSwabLong((uint32 *)&h.ras_type);
TIFFSwabLong((uint32 *)&h.ras_maptype);
TIFFSwabLong((uint32 *)&h.ras_maplength);
#endif
} else if (strcmp(h.ras_magic, RAS_MAGIC_INV) == 0) {
#ifdef WORDS_BIGENDIAN
TIFFSwabLong((uint32 *)&h.ras_width);
TIFFSwabLong((uint32 *)&h.ras_height);
TIFFSwabLong((uint32 *)&h.ras_depth);
TIFFSwabLong((uint32 *)&h.ras_length);
TIFFSwabLong((uint32 *)&h.ras_type);
TIFFSwabLong((uint32 *)&h.ras_maptype);
TIFFSwabLong((uint32 *)&h.ras_maplength);
#endif
} else {
fprintf(stderr, "%s: Not a rasterfile.\n", argv[optind]);
fclose(in);
return (-3);
}
out = TIFFOpen(argv[optind+1], "w");
if (out == NULL)
{
fclose(in);
return (-4);
}
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) h.ras_width);
TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) h.ras_height);
TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, h.ras_depth > 8 ? 3 : 1);
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, h.ras_depth > 1 ? 8 : 1);
TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
if (h.ras_maptype != RMT_NONE) {
uint16* red;
register uint16* map;
register int i, j;
int mapsize;
buf = (unsigned char *)_TIFFmalloc(h.ras_maplength);
if (buf == NULL) {
fprintf(stderr, "No space to read in colormap.\n");
return (-5);
}
if (fread(buf, h.ras_maplength, 1, in) != 1) {
fprintf(stderr, "%s: Read error on colormap.\n",
argv[optind]);
return (-6);
}
mapsize = 1<<h.ras_depth;
if (h.ras_maplength > mapsize*3) {
fprintf(stderr,
"%s: Huh, %ld colormap entries, should be %d?\n",
argv[optind], h.ras_maplength, mapsize*3);
return (-7);
}
red = (uint16*)_TIFFmalloc(mapsize * 3 * sizeof (uint16));
if (red == NULL) {
fprintf(stderr, "No space for colormap.\n");
return (-8);
}
map = red;
for (j = 0; j < 3; j++) {
#define SCALE(x) (((x)*((1L<<16)-1))/255)
for (i = h.ras_maplength/3; i-- > 0;)
*map++ = SCALE(*buf++);
if ((i = h.ras_maplength/3) < mapsize) {
i = mapsize - i;
_TIFFmemset(map, 0, i*sizeof (uint16));
map += i;
}
}
TIFFSetField(out, TIFFTAG_COLORMAP,
red, red + mapsize, red + 2*mapsize);
photometric = PHOTOMETRIC_PALETTE;
if (compression == (uint16) -1)
compression = COMPRESSION_PACKBITS;
TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
} else {
/* XXX this is bogus... */
photometric = h.ras_depth == 24 ?
PHOTOMETRIC_RGB : PHOTOMETRIC_MINISBLACK;
if (compression == (uint16) -1)
compression = COMPRESSION_LZW;
TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
}
switch (compression) {
case COMPRESSION_JPEG:
if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
photometric = PHOTOMETRIC_YCBCR;
TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
break;
case COMPRESSION_LZW:
case COMPRESSION_DEFLATE:
if (predictor != 0)
TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
break;
}
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
linebytes = ((h.ras_depth*h.ras_width+15) >> 3) &~ 1;
scanline = TIFFScanlineSize(out);
if (scanline > linebytes) {
buf = (unsigned char *)_TIFFmalloc(scanline);
_TIFFmemset(buf+linebytes, 0, scanline-linebytes);
} else
buf = (unsigned char *)_TIFFmalloc(linebytes);
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
TIFFDefaultStripSize(out, rowsperstrip));
for (row = 0; row < h.ras_height; row++) {
if (fread(buf, linebytes, 1, in) != 1) {
fprintf(stderr, "%s: scanline %ld: Read error.\n",
argv[optind], row);
break;
}
if (h.ras_type == RT_STANDARD && h.ras_depth == 24) {
tsize_t cc = h.ras_width;
unsigned char* cp = buf;
#define SWAP(a,b) { unsigned char t = (a); (a) = (b); (b) = t; }
do {
SWAP(cp[0], cp[2]);
cp += 3;
} while (--cc);
}
if (TIFFWriteScanline(out, buf, row, 0) < 0)
break;
}
(void) TIFFClose(out);
fclose(in);
return (0);
}
static int
processCompressOptions(char* opt)
{
if (streq(opt, "none"))
compression = COMPRESSION_NONE;
else if (streq(opt, "packbits"))
compression = COMPRESSION_PACKBITS;
else if (strneq(opt, "jpeg", 4)) {
char* cp = strchr(opt, ':');
compression = COMPRESSION_JPEG;
while( cp )
{
if (isdigit((int)cp[1]))
quality = atoi(cp+1);
else if (cp[1] == 'r' )
jpegcolormode = JPEGCOLORMODE_RAW;
else
usage();
cp = strchr(cp+1,':');
}
} else if (strneq(opt, "lzw", 3)) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_LZW;
} else if (strneq(opt, "zip", 3)) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_DEFLATE;
} else
return (0);
return (1);
}
char* stuff[] = {
"usage: ras2tiff [options] input.ras output.tif",
"where options are:",
" -r # make each strip have no more than # rows",
"",
" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
" -c zip[:opts] compress output with deflate encoding",
" -c jpeg[:opts] compress output with JPEG encoding",
" -c packbits compress output with packbits encoding",
" -c none use no compression algorithm on output",
"",
"JPEG options:",
" # set compression quality level (0-100, default 75)",
" r output color image as RGB rather than YCbCr",
"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
"",
"LZW and deflate options:",
" # set predictor value",
"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
" -h this help message",
NULL
};
static void
usage(void)
{
char buf[BUFSIZ];
int i;
setbuf(stderr, buf);
fprintf(stderr, "%s\n\n", TIFFGetVersion());
for (i = 0; stuff[i] != NULL; i++)
fprintf(stderr, "%s\n", stuff[i]);
exit(-1);
}
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,42 +0,0 @@
/* $Header: /cvs/libtiff/tools/rasterfile.h,v 1.3 2003/11/12 19:14:33 dron Exp $ */
/*
* Description of header for files containing raster images
*/
struct rasterfile {
char ras_magic[4]; /* magic number */
long ras_width; /* width (pixels) of image */
long ras_height; /* height (pixels) of image */
long ras_depth; /* depth (1, 8, or 24 bits) of pixel */
long ras_length; /* length (bytes) of image */
long ras_type; /* type of file; see RT_* below */
long ras_maptype; /* type of colormap; see RMT_* below */
long ras_maplength; /* length (bytes) of following map */
/* color map follows for ras_maplength bytes, followed by image */
};
#define RAS_MAGIC "\x59\xa6\x6a\x95"
#define RAS_MAGIC_INV "\x95\x6a\xa6\x59"
/* Sun supported ras_type's */
#define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
#define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
#define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
#define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
/* Sun registered ras_maptype's */
#define RMT_RAW 2
/* Sun supported ras_maptype's */
#define RMT_NONE 0 /* ras_maplength is expected to be 0 */
#define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
/*
* NOTES:
* Each line of the image is rounded out to a multiple of 16 bits.
* This corresponds to the rounding convention used by the memory pixrect
* package (/usr/include/pixrect/memvar.h) of the SunWindows system.
* The ras_encoding field (always set to 0 by Sun's supported software)
* was renamed to ras_length in release 2.0. As a result, rasterfiles
* of type 0 generated by the old software claim to have 0 length; for
* compatibility, code reading rasterfiles must be prepared to compute the
* true length from the width, height, and depth fields.
*/

View file

@ -1,335 +0,0 @@
/* $Id: sgi2tiff.c,v 1.6 2010-03-10 18:56:49 bfriesen Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gl/image.h>
#include <ctype.h>
#include "tiffio.h"
#define streq(a,b) (strcmp(a,b) == 0)
#define strneq(a,b,n) (strncmp(a,b,n) == 0)
static short config = PLANARCONFIG_CONTIG;
static uint16 compression = COMPRESSION_PACKBITS;
static uint16 predictor = 0;
static uint16 fillorder = 0;
static uint32 rowsperstrip = (uint32) -1;
static int jpegcolormode = JPEGCOLORMODE_RGB;
static int quality = 75; /* JPEG quality */
static uint16 photometric;
static void usage(void);
static int cpContig(IMAGE*, TIFF*);
static int cpSeparate(IMAGE*, TIFF*);
static int processCompressOptions(char*);
/* XXX image library has no prototypes */
extern IMAGE* iopen(const char*, const char*);
extern void iclose(IMAGE*);
extern void getrow(IMAGE*, short*, int, int);
int
main(int argc, char* argv[])
{
IMAGE *in;
TIFF *out;
int c;
extern int optind;
extern char* optarg;
while ((c = getopt(argc, argv, "c:p:r:")) != -1)
switch (c) {
case 'c': /* compression scheme */
if (!processCompressOptions(optarg))
usage();
break;
case 'f': /* fill order */
if (streq(optarg, "lsb2msb"))
fillorder = FILLORDER_LSB2MSB;
else if (streq(optarg, "msb2lsb"))
fillorder = FILLORDER_MSB2LSB;
else
usage();
break;
case 'p': /* planar configuration */
if (streq(optarg, "separate"))
config = PLANARCONFIG_SEPARATE;
else if (streq(optarg, "contig"))
config = PLANARCONFIG_CONTIG;
else
usage();
break;
case 'r': /* rows/strip */
rowsperstrip = atoi(optarg);
break;
case '?':
usage();
/*NOTREACHED*/
}
if (argc - optind != 2)
usage();
in = iopen(argv[optind], "r");
if (in == NULL)
return (-1);
out = TIFFOpen(argv[optind+1], "w");
if (out == NULL)
return (-2);
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) in->xsize);
TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) in->ysize);
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
if (in->zsize == 1)
photometric = PHOTOMETRIC_MINISBLACK;
else
photometric = PHOTOMETRIC_RGB;
switch (compression) {
case COMPRESSION_JPEG:
if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
photometric = PHOTOMETRIC_YCBCR;
TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
break;
case COMPRESSION_LZW:
case COMPRESSION_DEFLATE:
if (predictor != 0)
TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
break;
}
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
if (fillorder != 0)
TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, in->zsize);
if (in->zsize > 3) {
uint16 v[1];
v[0] = EXTRASAMPLE_UNASSALPHA;
TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, v);
}
TIFFSetField(out, TIFFTAG_MINSAMPLEVALUE, (uint16) in->min);
TIFFSetField(out, TIFFTAG_MAXSAMPLEVALUE, (uint16) in->max);
TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
if (config != PLANARCONFIG_SEPARATE)
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
TIFFDefaultStripSize(out, rowsperstrip));
else /* force 1 row/strip for library limitation */
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, 1L);
if (in->name[0] != '\0')
TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, in->name);
if (config == PLANARCONFIG_CONTIG)
cpContig(in, out);
else
cpSeparate(in, out);
(void) iclose(in);
(void) TIFFClose(out);
return (0);
}
static int
processCompressOptions(char* opt)
{
if (streq(opt, "none"))
compression = COMPRESSION_NONE;
else if (streq(opt, "packbits"))
compression = COMPRESSION_PACKBITS;
else if (strneq(opt, "jpeg", 4)) {
char* cp = strchr(opt, ':');
defcompression = COMPRESSION_JPEG;
while( cp )
{
if (isdigit((int)cp[1]))
quality = atoi(cp+1);
else if (cp[1] == 'r' )
jpegcolormode = JPEGCOLORMODE_RAW;
else
usage();
cp = strchr(cp+1,':');
}
} else if (strneq(opt, "lzw", 3)) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_LZW;
} else if (strneq(opt, "zip", 3)) {
char* cp = strchr(opt, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_DEFLATE;
} else
return (0);
return (1);
}
static int
cpContig(IMAGE* in, TIFF* out)
{
tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out));
short *r = NULL;
int x, y;
if (in->zsize == 3) {
short *g, *b;
r = (short *)_TIFFmalloc(3 * in->xsize * sizeof (short));
g = r + in->xsize;
b = g + in->xsize;
for (y = in->ysize-1; y >= 0; y--) {
uint8* pp = (uint8*) buf;
getrow(in, r, y, 0);
getrow(in, g, y, 1);
getrow(in, b, y, 2);
for (x = 0; x < in->xsize; x++) {
pp[0] = r[x];
pp[1] = g[x];
pp[2] = b[x];
pp += 3;
}
if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
goto bad;
}
} else if (in->zsize == 4) {
short *g, *b, *a;
r = (short *)_TIFFmalloc(4 * in->xsize * sizeof (short));
g = r + in->xsize;
b = g + in->xsize;
a = b + in->xsize;
for (y = in->ysize-1; y >= 0; y--) {
uint8* pp = (uint8*) buf;
getrow(in, r, y, 0);
getrow(in, g, y, 1);
getrow(in, b, y, 2);
getrow(in, a, y, 3);
for (x = 0; x < in->xsize; x++) {
pp[0] = r[x];
pp[1] = g[x];
pp[2] = b[x];
pp[3] = a[x];
pp += 4;
}
if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
goto bad;
}
} else {
uint8* pp = (uint8*) buf;
r = (short *)_TIFFmalloc(in->xsize * sizeof (short));
for (y = in->ysize-1; y >= 0; y--) {
getrow(in, r, y, 0);
for (x = in->xsize-1; x >= 0; x--)
pp[x] = r[x];
if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
goto bad;
}
}
if (r)
_TIFFfree(r);
_TIFFfree(buf);
return (1);
bad:
if (r)
_TIFFfree(r);
_TIFFfree(buf);
return (0);
}
static int
cpSeparate(IMAGE* in, TIFF* out)
{
tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out));
short *r = (short *)_TIFFmalloc(in->xsize * sizeof (short));
uint8* pp = (uint8*) buf;
int x, y, z;
for (z = 0; z < in->zsize; z++) {
for (y = in->ysize-1; y >= 0; y--) {
getrow(in, r, y, z);
for (x = 0; x < in->xsize; x++)
pp[x] = r[x];
if (TIFFWriteScanline(out, buf, in->ysize-y-1, z) < 0)
goto bad;
}
}
_TIFFfree(r);
_TIFFfree(buf);
return (1);
bad:
_TIFFfree(r);
_TIFFfree(buf);
return (0);
}
char* stuff[] = {
"usage: sgi2tiff [options] input.rgb output.tif",
"where options are:",
" -r # make each strip have no more than # rows",
"",
" -p contig pack samples contiguously (e.g. RGBRGB...)",
" -p separate store samples separately (e.g. RRR...GGG...BBB...)",
"",
" -f lsb2msb force lsb-to-msb FillOrder for output",
" -f msb2lsb force msb-to-lsb FillOrder for output",
"",
" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
" -c zip[:opts] compress output with deflate encoding",
" -c jpeg[:opts]compress output with JPEG encoding",
" -c packbits compress output with packbits encoding",
" -c none use no compression algorithm on output",
"",
"JPEG options:",
" # set compression quality level (0-100, default 75)",
" r output color image as RGB rather than YCbCr",
"",
"LZW and deflate options:",
" # set predictor value",
"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
NULL
};
static void
usage(void)
{
char buf[BUFSIZ];
int i;
setbuf(stderr, buf);
for (i = 0; stuff[i] != NULL; i++)
fprintf(stderr, "%s\n", stuff[i]);
exit(-1);
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,316 +0,0 @@
/* $Id: sgisv.c,v 1.6 2010-03-10 18:56:49 bfriesen Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gl.h>
#include <ctype.h>
#include "tiffio.h"
typedef unsigned char unsigned char;
typedef unsigned long uint32;
#define streq(a,b) (strcmp(a,b) == 0)
#define strneq(a,b,n) (strncmp(a,b,n) == 0)
uint32 rowsperstrip = (uint32) -1;
uint16 compression = COMPRESSION_PACKBITS;
uint16 config = PLANARCONFIG_CONTIG;
uint16 predictor = 0;
int xmaxscreen;
int ymaxscreen;
uint16 photometric = PHOTOMETRIC_RGB;
int jpegcolormode = JPEGCOLORMODE_RGB;
int quality = 75; /* JPEG quality */
static void usage(void);
static void tiffsv(char*, int, int, int, int);
int
main(int argc, char* argv[])
{
int c;
extern int optind;
extern char* optarg;
while ((c = getopt(argc, argv, "c:p:r:")) != -1)
switch (c) {
case 'b': /* save as b&w */
photometric = PHOTOMETRIC_MINISBLACK;
break;
case 'c': /* compression scheme */
if (streq(optarg, "none"))
compression = COMPRESSION_NONE;
else if (streq(optarg, "packbits"))
compression = COMPRESSION_PACKBITS;
else if (strneq(optarg, "jpeg", 4)) {
char* cp = strchr(optarg, ':');
if (cp && isdigit(cp[1]))
quality = atoi(cp+1);
if (cp && strchr(cp, 'r'))
jpegcolormode = JPEGCOLORMODE_RAW;
compression = COMPRESSION_JPEG;
} else if (strneq(optarg, "lzw", 3)) {
char* cp = strchr(optarg, ':');
if (cp)
predictor = atoi(cp+1);
compression = COMPRESSION_LZW;
} else
usage();
break;
case 'p': /* planar configuration */
if (streq(optarg, "separate"))
config = PLANARCONFIG_SEPARATE;
else if (streq(optarg, "contig"))
config = PLANARCONFIG_CONTIG;
else
usage();
break;
case 'r': /* rows/strip */
rowsperstrip = atoi(optarg);
break;
case '?':
usage();
/*NOTREACHED*/
}
if (argc - optind != 1 && argc - optind != 5)
usage();
xmaxscreen = getgdesc(GD_XPMAX)-1;
ymaxscreen = getgdesc(GD_YPMAX)-1;
foreground();
noport();
winopen("tiffsv");
if (argc - optind == 5)
tiffsv(argv[optind],
atoi(argv[optind+1]), atoi(argv[optind+2]),
atoi(argv[optind+3]), atoi(argv[optind+4]));
else
tiffsv(argv[optind], 0, xmaxscreen, 0, ymaxscreen);
return (0);
}
char* stuff[] = {
"usage: tiffsv [options] outimage.tif [x1 x2 y1 y2] [-b]",
"where options are:",
" -p contig pack samples contiguously (e.g. RGBRGB...)",
" -p separate store samples separately (e.g. RRR...GGG...BBB...)",
"",
" -r # make each strip have no more than # rows",
"",
" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
" -c jpeg[:opts]compress output with JPEG encoding",
" -c packbits compress output with packbits encoding",
" -c none use no compression algorithm on output",
"",
"JPEG options:",
" # set compression quality level (0-100, default 75)",
" r output color image as RGB rather than YCbCr",
"",
"LZW options:",
" # set predictor value for Lempel-Ziv & Welch encoding",
"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
NULL
};
static void
usage(void)
{
char buf[BUFSIZ];
int i;
setbuf(stderr, buf);
for (i = 0; stuff[i] != NULL; i++)
fprintf(stderr, "%s\n", stuff[i]);
exit(-1);
}
static void
svRGBSeparate(TIFF* tif, uint32* ss, int xsize, int ysize)
{
tsize_t stripsize = TIFFStripSize(tif);
unsigned char *rbuf = (unsigned char *)_TIFFmalloc(3*stripsize);
unsigned char *gbuf = rbuf + stripsize;
unsigned char *bbuf = gbuf + stripsize;
register int y;
for (y = 0; y <= ysize; y += rowsperstrip) {
unsigned char *rp, *gp, *bp;
register int x;
register uint32 n;
n = rowsperstrip;
if (n > ysize-y+1)
n = ysize-y+1;
rp = rbuf; gp = gbuf; bp = bbuf;
do {
for (x = 0; x <= xsize; x++) {
uint32 v = ss[x];
rp[x] = v;
gp[x] = v >> 8;
bp[x] = v >> 16;
}
rp += xsize+1, gp += xsize+1, bp += xsize+1;
ss += xsize+1;
} while (--n);
if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0),
rbuf, stripsize) < 0)
break;
if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,1),
gbuf, stripsize) < 0)
break;
if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,2),
bbuf, stripsize) < 0)
break;
}
_TIFFfree(rbuf);
}
static void
svRGBContig(TIFF* tif, uint32* ss, int xsize, int ysize)
{
register int x, y;
tsize_t stripsize = TIFFStripSize(tif);
unsigned char *strip = (unsigned char *)_TIFFmalloc(stripsize);
for (y = 0; y <= ysize; y += rowsperstrip) {
register unsigned char *pp = strip;
register uint32 n;
n = rowsperstrip;
if (n > ysize-y+1)
n = ysize-y+1;
do {
for (x = 0; x <= xsize; x++) {
uint32 v = ss[x];
pp[0] = v;
pp[1] = v >> 8;
pp[2] = v >> 16;
pp += 3;
}
ss += xsize+1;
} while (--n);
if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0),
strip, stripsize) < 0)
break;
}
_TIFFfree(strip);
}
#undef RED
#undef GREEN
#undef BLUE
#define CVT(x) (((x)*255)/100)
#define RED CVT(28) /* 28% */
#define GREEN CVT(59) /* 59% */
#define BLUE CVT(11) /* 11% */
static void
svGrey(TIFF* tif, uint32* ss, int xsize, int ysize)
{
register int x, y;
unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif));
for (y = 0; y <= ysize; y++) {
for (x = 0; x <= xsize; x++) {
unsigned char *cp = (unsigned char *)&ss[x];
buf[x] = (RED*cp[3] + GREEN*cp[2] + BLUE*cp[1]) >> 8;
}
if (TIFFWriteScanline(tif, buf, (uint32) y, 0) < 0)
break;
ss += xsize+1;
}
_TIFFfree(buf);
}
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(x) ((x)<0?-(x):(x))
static void
tiffsv(char* name, int x1, int x2, int y1, int y2)
{
TIFF *tif;
int xsize, ysize;
int xorg, yorg;
uint32 *scrbuf;
xorg = MIN(x1,x2);
yorg = MIN(y1,y2);
if (xorg<0)
xorg = 0;
if (yorg<0)
yorg = 0;
xsize = ABS(x2-x1);
ysize = ABS(y2-y1);
if (xorg+xsize > xmaxscreen)
xsize = xmaxscreen-xorg;
if (yorg+ysize > ymaxscreen)
ysize = ymaxscreen-yorg;
tif = TIFFOpen(name, "w");
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) (xsize+1));
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) (ysize+1));
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL,
photometric == PHOTOMETRIC_RGB ? 3 : 1);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, config);
TIFFSetField(tif, TIFFTAG_COMPRESSION, compression);
switch (compression) {
case COMPRESSION_JPEG:
if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
photometric = PHOTOMETRIC_YCBCR;
TIFFSetField(tif, TIFFTAG_JPEGQUALITY, quality);
TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
break;
case COMPRESSION_LZW:
if (predictor != 0)
TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor);
break;
}
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric);
TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_BOTLEFT);
rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip);
TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
scrbuf = (uint32 *)_TIFFmalloc((xsize+1)*(ysize+1)*sizeof (uint32));
readdisplay(xorg, yorg, xorg+xsize, yorg+ysize, scrbuf, RD_FREEZE);
if (photometric == PHOTOMETRIC_RGB) {
if (config == PLANARCONFIG_SEPARATE)
svRGBSeparate(tif, scrbuf, xsize, ysize);
else
svRGBContig(tif, scrbuf, xsize, ysize);
} else
svGrey(tif, scrbuf, xsize, ysize);
(void) TIFFClose(tif);
_TIFFfree((char *)scrbuf);
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

View file

@ -1,168 +0,0 @@
float ycbcrCoeffs[3] = { .299, .587, .114 };
/* default coding range is CCIR Rec 601-1 with no headroom/footroom */
unsigned long refBlackWhite[6] = { 0, 255, 128, 255, 128, 255 };
#define LumaRed ycbcrCoeffs[0]
#define LumaGreen ycbcrCoeffs[1]
#define LumaBlue ycbcrCoeffs[2]
long eRtotal = 0;
long eGtotal = 0;
long eBtotal = 0;
long preveRtotal = 0;
long preveGtotal = 0;
long preveBtotal = 0;
unsigned long AbseRtotal = 0;
unsigned long AbseGtotal = 0;
unsigned long AbseBtotal = 0;
unsigned long eCodes = 0;
unsigned long preveCodes = 0;
unsigned long eBits = 0;
unsigned long preveBits = 0;
static void setupLumaTables();
static int abs(int v) { return (v < 0 ? -v : v); }
static double pct(int v,double range) { return (v*100. / range); }
static void check(int R, int G, int B);
float D1, D2;
float D3, D4;
float D5, D6;
int
main(int argc, char** argv)
{
int R, G, B;
if (argc > 1) {
refBlackWhite[0] = 16;
refBlackWhite[1] = 235;
refBlackWhite[2] = 128;
refBlackWhite[3] = 240;
refBlackWhite[4] = 128;
refBlackWhite[5] = 240;
}
D3 = 2 - 2*LumaRed;
D4 = 2 - 2*LumaBlue;
D1 = 1. / D3;
D2 = 1. / D4;
D5 = D3*LumaRed / LumaGreen;
D6 = D4*LumaBlue / LumaGreen;
setupLumaTables();
for (R = 0; R < 256; R++) {
for (G = 0; G < 256; G++)
for (B = 0; B < 256; B++)
check(R, G, B);
printf("[%3u] c %u/%u b %u/%u (R %u/%d/%u G %u/%d/%u B %u/%d/%u)\n"
, R
, eCodes - preveCodes, eCodes
, eBits - preveBits, eBits
, abs(AbseRtotal - preveRtotal), eRtotal , AbseRtotal
, abs(AbseGtotal - preveGtotal), eGtotal , AbseGtotal
, abs(AbseBtotal - preveBtotal), eBtotal , AbseBtotal
);
preveRtotal = AbseRtotal;
preveGtotal = AbseGtotal;
preveBtotal = AbseBtotal;
preveCodes = eCodes;
preveBits = eBits;
}
printf("%u total codes\n", 256*256*256);
printf("total error: %u codes %u bits (R %d/%u G %d/%u B %d/%u)\n"
, eCodes
, eBits
, eRtotal , AbseRtotal
, eGtotal , AbseGtotal
, eBtotal , AbseBtotal
);
return (0);
}
float *lumaRed;
float *lumaGreen;
float *lumaBlue;
static float*
setupLuma(float c)
{
float *v = (float *)_TIFFmalloc(256 * sizeof (float));
int i;
for (i = 0; i < 256; i++)
v[i] = c * i;
return (v);
}
static void
setupLumaTables(void)
{
lumaRed = setupLuma(LumaRed);
lumaGreen = setupLuma(LumaGreen);
lumaBlue = setupLuma(LumaBlue);
}
static unsigned
V2Code(float f, unsigned long RB, unsigned long RW, int CR)
{
unsigned int c = (unsigned int)((((f)*(RW-RB)/CR)+RB)+.5);
return (c > 255 ? 255 : c);
}
#define Code2V(c, RB, RW, CR) ((((c)-(int)RB)*(float)CR)/(float)(RW-RB))
#define CLAMP(f,min,max) \
(int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5)
static
void
check(int R, int G, int B)
{
float Y, Cb, Cr;
int iY, iCb, iCr;
float rY, rCb, rCr;
float rR, rG, rB;
int eR, eG, eB;
Y = lumaRed[R] + lumaGreen[G] + lumaBlue[B];
Cb = (B - Y)*D2;
Cr = (R - Y)*D1;
iY = V2Code(Y, refBlackWhite[0], refBlackWhite[1], 255);
iCb = V2Code(Cb, refBlackWhite[2], refBlackWhite[3], 127);
iCr = V2Code(Cr, refBlackWhite[4], refBlackWhite[5], 127);
rCb = Code2V(iCb, refBlackWhite[2], refBlackWhite[3], 127);
rCr = Code2V(iCr, refBlackWhite[4], refBlackWhite[5], 127);
rY = Code2V(iY, refBlackWhite[0], refBlackWhite[1], 255);
rR = rY + rCr*D3;
rB = rY + rCb*D4;
rG = rY - rCb*D6 - rCr*D5;
eR = R - CLAMP(rR,0,255);
eG = G - CLAMP(rG,0,255);
eB = B - CLAMP(rB,0,255);
if (abs(eR) > 1 || abs(eG) > 1 || abs(eB) > 1) {
printf("R %u G %u B %u", R, G, B);
printf(" Y %g Cb %g Cr %g", Y, Cb, Cr);
printf(" iY %u iCb %u iCr %u", iY, iCb, iCr);
printf("\n -> Y %g Cb %g Cr %g", rY, rCb, rCr);
printf(" R %g (%u) G %g (%u) B %g (%u) E=[%d %d %d])\n"
, rR, CLAMP(rR,0,255)
, rG, CLAMP(rG,0,255)
, rB, CLAMP(rB,0,255)
, eR, eG, eB
);
}
eRtotal += eR;
eGtotal += eG;
eBtotal += eB;
AbseRtotal += abs(eR);
AbseGtotal += abs(eG);
AbseBtotal += abs(eB);
if (eR | eG | eB)
eCodes++;
eBits += abs(eR) + abs(eG) + abs(eB);
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 8
* fill-column: 78
* End:
*/

787
thirdparty/tiff-4.2.0/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,787 @@
# CMake build for libtiff
# Run "cmake" to generate the build files for your platform
#
# Copyright © 2015 Open Microscopy Environment / University of Dundee
# Written by Roger Leigh <rleigh@codelibre.net>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
cmake_minimum_required(VERSION 2.8.11) # b/c of use of BUILD_INTERFACE generator expression
# Default policy is from 2.8.9
cmake_policy(VERSION 2.8.9)
# Set MacOSX @rpath usage globally.
if (POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif(POLICY CMP0020)
if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif(POLICY CMP0042)
# Use new variable expansion policy.
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
endif(POLICY CMP0053)
if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif(POLICY CMP0054)
# Read version information from configure.ac.
FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" configure REGEX "^LIBTIFF_.*=")
foreach(line ${configure})
foreach(var LIBTIFF_MAJOR_VERSION LIBTIFF_MINOR_VERSION LIBTIFF_MICRO_VERSION LIBTIFF_ALPHA_VERSION
LIBTIFF_CURRENT LIBTIFF_REVISION LIBTIFF_AGE)
if(NOT ${var} AND line MATCHES "^${var}=(.*)")
set(${var} "${CMAKE_MATCH_1}")
break()
endif()
endforeach()
endforeach()
math(EXPR SO_MAJOR "${LIBTIFF_CURRENT} - ${LIBTIFF_AGE}")
set(SO_MINOR "${LIBTIFF_AGE}")
set(SO_REVISION "${LIBTIFF_REVISION}")
message(STATUS "Building tiff version ${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}${LIBTIFF_ALPHA_VERSION}")
message(STATUS "libtiff library version ${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}")
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
# Project version
project(tiff C)
set(VERSION "${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}")
set(tiff_VERSION "${VERSION}")
set(tiff_VERSION_MAJOR "${LIBTIFF_MAJOR_VERSION}")
set(tiff_VERSION_MINOR "${LIBTIFF_MINOR_VERSION}")
set(tiff_VERSION_PATCH "${LIBTIFF_MICRO_VERSION}")
# the other tiff_VERSION_* variables are set automatically
set(tiff_VERSION_ALPHA "${LIBTIFF_ALPHA_VERSION}")
# Library version (unlike libtool's baroque scheme, WYSIWYG here)
set(SO_COMPATVERSION "${SO_MAJOR}")
set(SO_VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}")
# For autotools header compatibility
set(PACKAGE_NAME "LibTIFF Software")
set(PACKAGE_TARNAME "${PROJECT_NAME}")
set(PACKAGE_VERSION "${PROJECT_VERSION}${tiff_VERSION_ALPHA}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "tiff@lists.maptools.org")
include(GNUInstallDirs)
include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
include(CheckLibraryExists)
include(CheckTypeSize)
include(CheckSymbolExists)
enable_testing()
macro(current_date var)
if(UNIX)
execute_process(COMMAND "date" +"%Y%m%d" OUTPUT_VARIABLE ${var})
endif()
endmacro()
current_date(RELEASE_DATE)
macro(extra_dist)
foreach(file ${ARGV})
file(RELATIVE_PATH relfile "${PROJECT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/${file}")
list(APPEND EXTRA_DIST "${relfile}")
endforeach()
set(EXTRA_DIST "${EXTRA_DIST}" PARENT_SCOPE)
endmacro()
set(EXTRA_DIST
HOWTO-RELEASE
Makefile.vc
SConstruct
autogen.sh
configure.com
nmake.opt
libtiff-4.pc.in)
# These are annoyingly verbose, produce false positives or don't work
# nicely with all supported compiler versions, so are disabled unless
# explicitly enabled.
option(extra-warnings "Enable extra compiler warnings" OFF)
# This will cause the compiler to fail when an error occurs.
option(fatal-warnings "Compiler warnings are errors" OFF)
# Check if the compiler supports each of the following additional
# flags, and enable them if supported. This greatly improves the
# quality of the build by checking for a number of common problems,
# some of which are quite serious.
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
CMAKE_C_COMPILER_ID MATCHES "Clang")
set(test_flags
-Wall
-Winline
-W
-Wformat-security
-Wpointer-arith
-Wdisabled-optimization
-Wno-unknown-pragmas
-Wdeclaration-after-statement
-fstrict-aliasing)
if(extra-warnings)
list(APPEND test_flags
-Wfloat-equal
-Wmissing-prototypes
-Wunreachable-code)
endif()
if(fatal-warnings)
list(APPEND test_flags
-Werror)
endif()
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
set(test_flags)
if(extra-warnings)
list(APPEND test_flags
/W4)
else()
list(APPEND test_flags
/W3)
endif()
if (fatal-warnings)
list(APPEND test_flags
/WX)
endif()
endif()
foreach(flag ${test_flags})
string(REGEX REPLACE "[^A-Za-z0-9]" "_" flag_var "${flag}")
set(test_c_flag "C_FLAG${flag_var}")
CHECK_C_COMPILER_FLAG(${flag} "${test_c_flag}")
if (${test_c_flag})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
endif (${test_c_flag})
endforeach(flag ${test_flags})
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
option(ld-version-script "Enable linker version script" ON)
# Check if LD supports linker scripts.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
global: sym;
};
VERS_2 {
global: sym;
} VERS_1;
")
set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
if (ld-version-script AND HAVE_LD_VERSION_SCRIPT)
set(HAVE_LD_VERSION_SCRIPT TRUE)
else()
set(HAVE_LD_VERSION_SCRIPT FALSE)
endif()
# Find libm, if available
if(NOT MINGW)
find_library(M_LIBRARY m)
endif()
check_include_file(assert.h HAVE_ASSERT_H)
check_include_file(dlfcn.h HAVE_DLFCN_H)
check_include_file(fcntl.h HAVE_FCNTL_H)
check_include_file(inttypes.h HAVE_INTTYPES_H)
check_include_file(io.h HAVE_IO_H)
check_include_file(search.h HAVE_SEARCH_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(string.h HAVE_STRING_H)
check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(sys/time.h HAVE_SYS_TIME_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(unistd.h HAVE_UNISTD_H)
# Inspired from /usr/share/autoconf/autoconf/c.m4
foreach(inline_keyword "inline" "__inline__" "__inline")
if(NOT DEFINED C_INLINE)
set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS})
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
"-Dinline=${inline_keyword}")
check_c_source_compiles("
typedef int foo_t;
static inline foo_t static_foo() {return 0;}
foo_t foo(){return 0;}
int main(int argc, char *argv[]) {return 0;}"
C_HAS_${inline_keyword})
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE})
if(C_HAS_${inline_keyword})
set(C_INLINE TRUE)
set(INLINE_KEYWORD "${inline_keyword}")
endif()
endif()
endforeach()
if(NOT DEFINED C_INLINE)
set(INLINE_KEYWORD)
endif()
# off_t and size_t checks omitted; not clear they are used at all
# Are off_t and size_t checks strictly necessary?
# Check if sys/time.h and time.h allow use together
check_c_source_compiles("
#include <sys/time.h>
#include <time.h>
int main(void){return 0;}"
TIME_WITH_SYS_TIME)
# Check if struct tm is in sys/time.h
check_c_source_compiles("
#include <sys/types.h>
#include <time.h>
int main(void){
struct tm tm;
int *p = &tm.tm_sec;
return !p;
}"
TM_IN_SYS_TIME)
# Check type sizes
# NOTE: Could be replaced with C99 <stdint.h>
check_type_size("signed int" SIZEOF_SIGNED_INT)
check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
check_type_size("signed long" SIZEOF_SIGNED_LONG)
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
check_type_size("signed long long" SIZEOF_SIGNED_LONG_LONG)
check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
check_type_size("unsigned char *" SIZEOF_UNSIGNED_CHAR_P)
set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES})
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h")
check_type_size("size_t" SIZEOF_SIZE_T)
check_type_size("ptrdiff_t" SIZEOF_PTRDIFF_T)
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE})
macro(report_values)
foreach(val ${ARGV})
message(STATUS "${val} set to ${${val}}")
endforeach()
endmacro()
set(TIFF_INT8_T "signed char")
set(TIFF_UINT8_T "unsigned char")
set(TIFF_INT16_T "signed short")
set(TIFF_UINT16_T "unsigned short")
if(SIZEOF_SIGNED_INT EQUAL 4)
set(TIFF_INT32_T "signed int")
set(TIFF_INT32_FORMAT "%d")
elseif(SIZEOF_SIGNED_LONG EQUAL 4)
set(TIFF_INT32_T "signed long")
set(TIFF_INT32_FORMAT "%ld")
endif()
if(SIZEOF_UNSIGNED_INT EQUAL 4)
set(TIFF_UINT32_T "unsigned int")
set(TIFF_UINT32_FORMAT "%u")
elseif(SIZEOF_UNSIGNED_LONG EQUAL 4)
set(TIFF_UINT32_T "unsigned long")
set(TIFF_UINT32_FORMAT "%lu")
endif()
if(SIZEOF_SIGNED_LONG EQUAL 8)
set(TIFF_INT64_T "signed long")
set(TIFF_INT64_FORMAT "%ld")
elseif(SIZEOF_SIGNED_LONG_LONG EQUAL 8)
set(TIFF_INT64_T "signed long long")
if (MINGW)
set(TIFF_INT64_FORMAT "%I64d")
else()
set(TIFF_INT64_FORMAT "%lld")
endif()
endif()
if(SIZEOF_UNSIGNED_LONG EQUAL 8)
set(TIFF_UINT64_T "unsigned long")
set(TIFF_UINT64_FORMAT "%lu")
elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8)
set(TIFF_UINT64_T "unsigned long long")
if (MINGW)
set(TIFF_UINT64_FORMAT "%I64u")
else()
set(TIFF_UINT64_FORMAT "%llu")
endif()
endif()
if(SIZEOF_UNSIGNED_INT EQUAL SIZEOF_SIZE_T)
set(TIFF_SIZE_T "unsigned int")
set(TIFF_SIZE_FORMAT "%u")
set(TIFF_SSIZE_T "signed int")
set(TIFF_SSIZE_FORMAT "%d")
elseif(SIZEOF_UNSIGNED_LONG EQUAL SIZEOF_SIZE_T)
set(TIFF_SIZE_T "unsigned long")
set(TIFF_SIZE_FORMAT "%lu")
set(TIFF_SSIZE_T "signed long")
set(TIFF_SSIZE_FORMAT "%ld")
elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL SIZEOF_SIZE_T)
set(TIFF_SIZE_T "unsigned long long")
set(TIFF_SSIZE_T "signed long long")
if (MINGW)
set(TIFF_SIZE_FORMAT "%I64u")
set(TIFF_SSIZE_FORMAT "%I64d")
else()
set(TIFF_SIZE_FORMAT "%llu")
set(TIFF_SSIZE_FORMAT "%lld")
endif()
endif()
if(NOT SIZEOF_PTRDIFF_T)
set(TIFF_PTRDIFF_T "${TIFF_SSIZE_T}")
set(TIFF_PTRDIFF_FORMAT "${SSIZE_FORMAT}")
else()
set(TIFF_PTRDIFF_T "ptrdiff_t")
set(TIFF_PTRDIFF_FORMAT "%ld")
endif()
#report_values(TIFF_INT8_T TIFF_INT8_FORMAT
# TIFF_UINT8_T TIFF_UINT8_FORMAT
# TIFF_INT16_T TIFF_INT16_FORMAT
# TIFF_UINT16_T TIFF_UINT16_FORMAT
# TIFF_INT32_T TIFF_INT32_FORMAT
# TIFF_UINT32_T TIFF_UINT32_FORMAT
# TIFF_INT64_T TIFF_INT64_FORMAT
# TIFF_UINT64_T TIFF_UINT64_FORMAT
# TIFF_SSIZE_T TIFF_SSIZE_FORMAT
# TIFF_PTRDIFF_T TIFF_PTRDIFF_FORMAT)
check_symbol_exists(mmap "sys/mman.h" HAVE_MMAP)
check_symbol_exists(setmode "unistd.h" HAVE_SETMODE)
check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
check_symbol_exists(strcasecmp "strings.h" HAVE_STRCASECMP)
check_symbol_exists(strtol "stdlib.h" HAVE_STRTOL)
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL)
check_symbol_exists(strtoul "stdlib.h" HAVE_STRTOUL)
check_symbol_exists(strtoull "stdlib.h" HAVE_STRTOULL)
check_symbol_exists(getopt "unistd.h;stdio.h" HAVE_GETOPT)
check_symbol_exists(lfind "search.h" HAVE_LFIND)
if(NOT HAVE_SNPRINTF)
add_definitions(-DNEED_LIBPORT)
endif()
# CPU bit order
set(HOST_FILLORDER FILLORDER_MSB2LSB)
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i.*86.*" OR
CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*" OR
# AMD64 on Windows
CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "AMD64" OR
CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64.*")
set(HOST_FILLORDER FILLORDER_LSB2MSB)
endif()
# CPU endianness
include(TestBigEndian)
test_big_endian(HOST_BIG_ENDIAN)
if(HOST_BIG_ENDIAN)
add_definitions(-DWORDS_BIGENDIAN)
endif()
# IEEE floating point
set(HAVE_IEEEFP 1)
report_values(CMAKE_HOST_SYSTEM_PROCESSOR HOST_FILLORDER
HOST_BIG_ENDIAN HAVE_IEEEFP)
# Large file support
if (UNIX OR MINGW)
# This might not catch every possibility catered for by
# AC_SYS_LARGEFILE.
add_definitions(-D_FILE_OFFSET_BITS=64)
set(FILE_OFFSET_BITS 64)
endif()
# Documentation install directory (default to cmake project docdir)
set(LIBTIFF_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}")
# Options to enable and disable internal codecs
option(ccitt "support for CCITT Group 3 & 4 algorithms" ON)
set(CCITT_SUPPORT ${ccitt})
option(packbits "support for Macintosh PackBits algorithm" ON)
set(PACKBITS_SUPPORT ${packbits})
option(lzw "support for LZW algorithm" ON)
set(LZW_SUPPORT ${lzw})
option(thunder "support for ThunderScan 4-bit RLE algorithm" ON)
set(THUNDER_SUPPORT ${thunder})
option(next "support for NeXT 2-bit RLE algorithm" ON)
set(NEXT_SUPPORT ${next})
option(logluv "support for LogLuv high dynamic range algorithm" ON)
set(LOGLUV_SUPPORT ${logluv})
# Option for Microsoft Document Imaging
option(mdi "support for Microsoft Document Imaging" ON)
set(MDI_SUPPORT ${mdi})
# ZLIB
option(zlib "use zlib (required for Deflate compression)" ON)
if (zlib)
find_package(ZLIB)
endif()
set(ZLIB_SUPPORT 0)
if(ZLIB_FOUND)
set(ZLIB_SUPPORT 1)
endif()
set(ZIP_SUPPORT ${ZLIB_SUPPORT})
# libdeflate
option(libdeflate "use libdeflate (optional for faster Deflate support, still requires zlib)" ON)
if (libdeflate)
set(DEFLATE_FOUND 0)
find_path(DEFLATE_INCLUDE_DIR libdeflate.h)
set(DEFLATE_NAMES ${DEFLATE_NAMES} deflate)
find_library(DEFLATE_LIBRARY NAMES ${DEFLATE_NAMES})
if (DEFLATE_INCLUDE_DIR AND DEFLATE_LIBRARY)
set(DEFLATE_FOUND 1)
set(DEFLATE_LIBRARIES ${DEFLATE_LIBRARY})
endif()
endif()
set(LIBDEFLATE_SUPPORT FALSE)
if(DEFLATE_FOUND)
set(LIBDEFLATE_SUPPORT TRUE)
endif()
if(LIBDEFLATE_SUPPORT AND NOT ZIP_SUPPORT)
message(WARNING "libdeflate available but zlib is not. libdeflate cannot be used")
set(LIBDEFLATE_SUPPORT FALSE)
endif()
set(LIBDEFLATE_SUPPORT ${LIBDEFLATE_SUPPORT})
# Option for Pixar log-format algorithm
# Pixar log format
option(pixarlog "support for Pixar log-format algorithm (requires Zlib)" ON)
set(PIXARLOG_SUPPORT FALSE)
if (ZLIB_SUPPORT)
if(pixarlog)
set(PIXARLOG_SUPPORT TRUE)
endif()
endif()
# JPEG
option(jpeg "use libjpeg (required for JPEG compression)" ON)
if (jpeg)
find_package(JPEG)
endif()
set(JPEG_SUPPORT FALSE)
if(JPEG_FOUND)
set(JPEG_SUPPORT TRUE)
endif()
option(old-jpeg "support for Old JPEG compression (read-only)" ON)
set(OJPEG_SUPPORT FALSE)
if (JPEG_SUPPORT)
if (old-jpeg)
set(OJPEG_SUPPORT TRUE)
endif()
endif()
# JBIG-KIT
option(jbig "use ISO JBIG compression (requires JBIT-KIT library)" ON)
if (jbig)
set(JBIG_FOUND 0)
find_path(JBIG_INCLUDE_DIR jbig.h)
set(JBIG_NAMES ${JBIG_NAMES} jbig libjbig)
find_library(JBIG_LIBRARY NAMES ${JBIG_NAMES})
if (JBIG_INCLUDE_DIR AND JBIG_LIBRARY)
set(JBIG_FOUND 1)
set(JBIG_LIBRARIES ${JBIG_LIBRARY})
endif()
endif()
set(JBIG_SUPPORT 0)
if(JBIG_FOUND)
set(JBIG_FOUND TRUE)
set(JBIG_SUPPORT 1)
else()
set(JBIG_FOUND FALSE)
endif()
set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${JBIG_INCLUDE_DIR})
check_symbol_exists(jbg_newlen "jbig.h" HAVE_JBG_NEWLEN)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
# liblzma2
option(lzma "use liblzma (required for LZMA2 compression)" ON)
if (lzma)
find_package(LibLZMA)
endif()
set(LZMA_SUPPORT 0)
if(LIBLZMA_FOUND)
set(LZMA_SUPPORT 1)
endif()
# libzstd
option(zstd "use libzstd (required for ZSTD compression)" ON)
if (zstd)
find_path(ZSTD_INCLUDE_DIR zstd.h)
find_library(ZSTD_LIBRARY NAMES zstd)
if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY)
check_library_exists ("${ZSTD_LIBRARY}" ZSTD_decompressStream "" ZSTD_RECENT_ENOUGH)
if (ZSTD_RECENT_ENOUGH)
set(ZSTD_FOUND TRUE)
set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
message(STATUS "Found ZSTD library: ${ZSTD_LIBRARY}")
else ()
message(WARNING "Found ZSTD library, but not recent enough. Use zstd >= 1.0")
endif ()
endif ()
endif()
set(ZSTD_SUPPORT 0)
if(ZSTD_FOUND)
set(ZSTD_SUPPORT 1)
endif()
# libwebp
option(webp "use libwebp (required for WEBP compression)" ON)
if (webp)
find_path(WEBP_INCLUDE_DIR /webp/decode.h)
find_library(WEBP_LIBRARY NAMES webp)
endif()
set(WEBP_SUPPORT 0)
set(WEBP_FOUND FALSE)
if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY)
set(WEBP_SUPPORT 1)
set(WEBP_FOUND TRUE)
set(WEBP_LIBRARIES ${WEBP_LIBRARY})
message(STATUS "Found WEBP library: ${WEBP_LIBRARY}")
endif()
# 8/12-bit jpeg mode
option(jpeg12 "enable libjpeg 8/12-bit dual mode (requires separate
12-bit libjpeg build)" ON)
set(JPEG12_INCLUDE_DIR JPEG12_INCLUDE_DIR-NOTFOUND CACHE PATH "Include directory for 12-bit libjpeg")
set(JPEG12_LIBRARY JPEG12_LIBRARY-NOTFOUND CACHE FILEPATH "12-bit libjpeg library")
set(JPEG12_FOUND FALSE)
if (JPEG12_INCLUDE_DIR AND JPEG12_LIBRARY)
set(JPEG12_LIBRARIES ${JPEG12_LIBRARY})
set(JPEG12_FOUND TRUE)
endif()
if (JPEG12_FOUND)
set(JPEG_DUAL_MODE_8_12 1)
set(LIBJPEG_12_PATH "${JPEG12_INCLUDE_DIR}/jpeglib.h")
endif()
# C++ support
option(cxx "Enable C++ stream API building (requires C++ compiler)" ON)
set(CXX_SUPPORT FALSE)
if (cxx)
enable_language(CXX)
set(CXX_SUPPORT TRUE)
endif()
# OpenGL and GLUT
find_package(OpenGL)
find_package(GLUT)
set(HAVE_OPENGL FALSE)
if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND)
set(HAVE_OPENGL TRUE)
endif()
# Purely to satisfy the generated headers:
check_include_file(GL/gl.h HAVE_GL_GL_H)
check_include_file(GL/glu.h HAVE_GL_GLU_H)
check_include_file(GL/glut.h HAVE_GL_GLUT_H)
check_include_file(GLUT/glut.h HAVE_GLUT_GLUT_H)
check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H)
check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H)
# Win32 IO
set(win32_io FALSE)
if(WIN32)
set(win32_io TRUE)
endif()
set(USE_WIN32_FILEIO ${win32_io})
# Orthogonal features
# Strip chopping
option(strip-chopping "strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)" ON)
set(TIFF_DEFAULT_STRIP_SIZE 8192 CACHE STRING "default size of the strip in bytes (when strip chopping is enabled)")
set(STRIPCHOP_DEFAULT)
if(strip-chopping)
set(STRIPCHOP_DEFAULT TRUE)
if(TIFF_DEFAULT_STRIP_SIZE)
set(STRIP_SIZE_DEFAULT "${TIFF_DEFAULT_STRIP_SIZE}")
endif()
endif()
# Defer loading of strip/tile offsets
option(defer-strile-load "enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen())" OFF)
set(DEFER_STRILE_LOAD ${defer-strile-load})
# CHUNKY_STRIP_READ_SUPPORT
option(chunky-strip-read "enable reading large strips in chunks for TIFFReadScanline() (experimental)" OFF)
set(CHUNKY_STRIP_READ_SUPPORT ${chunky-strip-read})
# SUBIFD support
set(SUBIFD_SUPPORT 1)
# Default handling of ASSOCALPHA support.
option(extrasample-as-alpha "the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly" ON)
if(extrasample-as-alpha)
set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1)
endif()
# Default handling of YCbCr subsampling support.
# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
option(check-ycbcr-subsampling "enable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag" ON)
if (check-ycbcr-subsampling)
set(CHECK_JPEG_YCBCR_SUBSAMPLING 1)
endif()
# Generate pkg-config file
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff-4.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc
DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
# Includes used by libtiff (and tests)
if(ZLIB_INCLUDE_DIRS)
list(APPEND TIFF_INCLUDES ${ZLIB_INCLUDE_DIRS})
endif()
if(DEFLATE_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${DEFLATE_INCLUDE_DIR})
endif()
if(JPEG_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${JPEG_INCLUDE_DIR})
endif()
if(JPEG12_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${JPEG12_INCLUDE_DIR})
endif()
if(JBIG_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${JBIG_INCLUDE_DIR})
endif()
if(LIBLZMA_INCLUDE_DIRS)
list(APPEND TIFF_INCLUDES ${LIBLZMA_INCLUDE_DIRS})
endif()
if(ZSTD_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${ZSTD_INCLUDE_DIR})
endif()
if(WEBP_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${WEBP_INCLUDE_DIR})
endif()
# Libraries required by libtiff
set(TIFF_LIBRARY_DEPS)
if(NOT MINGW AND M_LIBRARY)
list(APPEND TIFF_LIBRARY_DEPS "m")
endif()
if(ZLIB_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${ZLIB_LIBRARIES})
endif()
if(DEFLATE_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${DEFLATE_LIBRARIES})
endif()
if(JPEG_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${JPEG_LIBRARIES})
endif()
if(JPEG12_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${JPEG12_LIBRARIES})
endif()
if(JBIG_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${JBIG_LIBRARIES})
endif()
if(LIBLZMA_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${LIBLZMA_LIBRARIES})
endif()
if(ZSTD_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${ZSTD_LIBRARIES})
endif()
if(WEBP_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${WEBP_LIBRARIES})
endif()
#report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS)
# Process subdirectories
add_subdirectory(port)
add_subdirectory(libtiff)
add_subdirectory(tools)
add_subdirectory(test)
add_subdirectory(contrib)
add_subdirectory(build)
add_subdirectory(man)
add_subdirectory(html)
#message(STATUS "EXTRA_DIST: ${EXTRA_DIST}")
message(STATUS "")
message(STATUS "Libtiff is now configured for ${host}")
message(STATUS "")
message(STATUS " Installation directory: ${prefix}")
message(STATUS " Documentation directory: ${LIBTIFF_DOCDIR}")
message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
message(STATUS " Enable linker symbol versioning: ${HAVE_LD_VERSION_SCRIPT}")
message(STATUS " Support Microsoft Document Imaging: ${mdi}")
message(STATUS " Use win32 IO: ${USE_WIN32_FILEIO}")
message(STATUS "")
message(STATUS " Support for internal codecs:")
message(STATUS " CCITT Group 3 & 4 algorithms: ${ccitt}")
message(STATUS " Macintosh PackBits algorithm: ${packbits}")
message(STATUS " LZW algorithm: ${lzw}")
message(STATUS " ThunderScan 4-bit RLE algorithm: ${thunder}")
message(STATUS " NeXT 2-bit RLE algorithm: ${next}")
message(STATUS " LogLuv high dynamic range encoding: ${logluv}")
message(STATUS "")
message(STATUS " Support for external codecs:")
message(STATUS " ZLIB support: ${zlib} (requested) ${ZLIB_FOUND} (availability)")
message(STATUS " libdeflate support: ${libdeflate} (requested) ${LIBDEFLATE_SUPPORT} (availability)")
message(STATUS " Pixar log-format algorithm: ${pixarlog} (requested) ${PIXARLOG_SUPPORT} (availability)")
message(STATUS " JPEG support: ${jpeg} (requested) ${JPEG_FOUND} (availability)")
message(STATUS " Old JPEG support: ${old-jpeg} (requested) ${JPEG_FOUND} (availability)")
message(STATUS " JPEG 8/12 bit dual mode: ${jpeg12} (requested) ${JPEG12_FOUND} (availability)")
message(STATUS " ISO JBIG support: ${jbig} (requested) ${JBIG_FOUND} (availability)")
message(STATUS " LZMA2 support: ${lzma} (requested) ${LIBLZMA_FOUND} (availability)")
message(STATUS " ZSTD support: ${zstd} (requested) ${ZSTD_FOUND} (availability)")
message(STATUS " WEBP support: ${webp} (requested) ${WEBP_FOUND} (availability)")
message(STATUS "")
message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)")
message(STATUS "")
# message(STATUS " X Athena Widgets support: ${HAVE_XAW}")
message(STATUS " OpenGL support: ${HAVE_OPENGL}")
message(STATUS "")

11094
thirdparty/tiff-4.2.0/ChangeLog vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
HOWTO-RELEASE:
HOWTO-RELEASE:
Notes on releasing.
@ -10,24 +10,42 @@ Notes on releasing.
1.4.16 is needed in order to avoid bugs in m4. These packages may
be downloaded from the following ftp locations:
m4 - ftp://ftp.gnu.org/pub/gnu/m4
autoconf - ftp://ftp.gnu.org/pub/gnu/autoconf
automake - ftp://ftp.gnu.org/pub/gnu/automake
libtool - ftp://ftp.gnu.org/pub/gnu/libtool
m4 - ftp://ftp.gnu.org/pub/gnu/m4
It is recommended to install m4 before autoconf, since the later
requires the former.
Release builds should only be done on a system with a functioning
and correctly set system clock and on a filesystem which accurately
records file update times. Use of GNU make is recommended.
1. Commit any unsaved changes.
1. Commit any unsaved changes.
2. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
2. Use gnulib's gitlog-to-changelog script to add new (since the last
release) entries to the traditional ChangeLog file. Take note of
the most recent change note time stamp and use that as the starting
point. Concatenate the old logs to the new logs. The added logs
may be used to help produce the release notes (in next step). For
example:
gitlog-to-changelog --since=`head -n 1 ChangeLog | sed -e 's/ .*//g'` --append-dot > ChangeLog.added
printf "\n" >> ChangeLog.added
cat ChangeLog.added ChangeLog > ChangeLog.new
mv ChangeLog.new ChangeLog
rm ChangeLog.added
3. Create html/vX.X.html and add it to git with 'git add html/vX.X.html'.
Take ChangeLog entries and html-ify in there.
Easist thing to do is take html/vX.(X-1).html and use it as a template.
Add that file to the list of EXTRA_DIST files in the html/Makefile.am.
3. Update html/index.html to refer to this new page as the current release.
4. Add vX.X.html file to the list of 'docfiles' files in the html/Makefile.am.
4. Increment the release version in configure.ac. Put 'alpha' or
5. Update html/index.html to refer to this new page as the current release.
6. Increment the release version in configure.ac. Put 'alpha' or
'beta' after the version, if applicable. For example:
4.0.0
@ -37,7 +55,7 @@ Notes on releasing.
Version should be updated in two places: in the second argument of the
AC_INIT macro and in LIBTIFF_xxx_VERSION variables.
5. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT,
7. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT,
LIBTIFF_REVISION, and LIBTIFF_AGE). These numbers have nothing to
do with the libtiff release version numbers.
@ -48,11 +66,11 @@ Notes on releasing.
have been added, removed, or interface structures have changed,
then more care is required.
6. Add an entry to Changelog similar to:
8. Add an entry to Changelog similar to:
* libtiff 4.0.0 released.
7. In the source tree do
9. In the source tree do
./autogen.sh
@ -60,7 +78,7 @@ Notes on releasing.
maintainer build with current autoconf, automake, and libtool
packages. It is only needed when updating tool versions.
8. It is recommended (but not required) to build outside of the source
10. It is recommended (but not required) to build outside of the source
tree so that the source tree is kept in a pristine state. This
also allows sharing the source directory on several networked
systems. For example:
@ -73,17 +91,17 @@ Notes on releasing.
./configure --enable-maintainer-mode
9. In the build tree do
11. In the build tree do
make release
This will update "RELEASE-DATE", "VERSION", and libtiff/tiffvers.h
in the source tree.
10. In the source tree, verify that the version info in RELEASE-DATE,
12. In the source tree, verify that the version info in RELEASE-DATE,
VERSION and libtiff/tiffvers.h is right.
11. In the build tree do
13. In the build tree do
make
make distcheck
@ -94,24 +112,35 @@ Notes on releasing.
Two files with names tiff-version.tar.gz and tiff-version.zip will
be created in the top level build directory.
12. In the source tree do
14. In the source tree do
'cvs commit'.
'git status', 'git add .', 'git commit' and 'git push'
13. In the source tree do
15. In the source tree, create a signed tag
cvs tag Release-v4-0-0
git tag -s v4.0.0 -m "Create tag for v4.0.0"
(or the appropriate name for the release)
14. Copy release packages from the build tree to the
and push it to "origin" (if "origin" points to the official repository)
git push origin v4.0.0
16. Sign the release files in the build tree using your private key
export GPG_TTY=$(tty)
for file in tiff-*.tar.gz tiff-*.zip ; do \
gpg2 --output ${file}.sig --detach-sig $file ; \
done
for file in tiff-*.tar.gz tiff-*.zip ; do \
gpg2 --verify ${file}.sig $file ; \
done
17. Copy release packages from the build tree to the
ftp.remotesensing.org ftp site.
scp tiff-*.tar.gz tiff-*.zip \
warmerdam@upload.osgeo.org:/osgeo/download/libtiff
15. Announce to list, tiff@lists.maptools.org
16. Update libtiff page on freshmeat with new version announcement.
bfriesen@upload.osgeo.org:/osgeo/download/libtiff
18. Announce to list, tiff@lists.maptools.org

View file

@ -31,23 +31,35 @@ ACLOCAL_AMFLAGS = -I m4
docfiles = \
COPYRIGHT \
ChangeLog \
README \
README.vms \
README.md \
RELEASE-DATE \
TODO \
VERSION
EXTRA_DIST = \
CMakeLists.txt \
HOWTO-RELEASE \
Makefile.vc \
SConstruct \
autogen.sh \
configure.com \
nmake.opt \
libtiff-4.pc.in
libtiff-4.pc.in \
nmake.opt
dist_doc_DATA = $(docfiles)
distcheck-hook:
if [ -x "$(CMAKE)" ]; then \
mkdir $(distdir)/_build/cmake \
&& cd $(distdir)/_build/cmake \
&& cmake ../.. \
&& $(MAKE) \
&& ctest -V \
&& $(MAKE) DESTDIR=../../_inst/cmake install ; \
fi
rm -rf $(distdir)/_build/cmake
rm -rf $(distdir)/_inst/cmake
SUBDIRS = port libtiff tools build contrib test man html
release:
@ -57,3 +69,22 @@ release:
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtiff-4.pc
# Special rules to assist with Coverity submissions.
PACKAGE_CHANGE_DATE=`awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog`
COVERITY_EMAIL=bfriesen@simple.dallas.tx.us
COVERITY_TARBALL=libtiff.xz
COVERITY_VERSION=devel-${PACKAGE_CHANGE_DATE}
COVERITY_DESCRIPTION='libtiff development'
coverity:
$(MAKE) clean
cov-build --dir cov-int $(MAKE)
tar caf $(COVERITY_TARBALL) cov-int
curl --limit-rate 50K \
--form token=`cat $$HOME/.coverity_key_tiff` \
--form email=$(COVERITY_EMAIL) \
--form file=@$(COVERITY_TARBALL) \
--form version=$(COVERITY_VERSION) \
--form description=$(COVERITY_DESCRIPTION) \
https://scan.coverity.com/builds?project=tiff
$(RM) $(COVERITY_TARBALL)

View file

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.12.4 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -40,23 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
test $$am__dry = yes; \
}
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -76,17 +114,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/libtiff-4.pc.in $(top_srcdir)/config/compile \
$(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing \
$(top_srcdir)/config/mkinstalldirs $(top_srcdir)/configure \
ChangeLog TODO config/compile config/config.guess \
config/config.sub config/depcomp config/install-sh \
config/ltmain.sh config/missing config/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@ -94,9 +121,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES = libtiff-4.pc
@ -115,13 +144,14 @@ am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@ -158,13 +188,40 @@ am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"
DATA = $(dist_doc_DATA) $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
cscope distdir dist dist-all distcheck
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libtiff-4.pc.in \
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing ChangeLog TODO config/compile \
config/config.guess config/config.sub config/depcomp \
config/install-sh config/ltmain.sh config/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -219,6 +276,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@ -266,6 +324,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@ -358,25 +417,32 @@ ACLOCAL_AMFLAGS = -I m4
docfiles = \
COPYRIGHT \
ChangeLog \
README \
README.vms \
README.md \
RELEASE-DATE \
TODO \
VERSION
EXTRA_DIST = \
CMakeLists.txt \
HOWTO-RELEASE \
Makefile.vc \
SConstruct \
autogen.sh \
configure.com \
nmake.opt \
libtiff-4.pc.in
libtiff-4.pc.in \
nmake.opt
dist_doc_DATA = $(docfiles)
SUBDIRS = port libtiff tools build contrib test man html
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtiff-4.pc
# Special rules to assist with Coverity submissions.
PACKAGE_CHANGE_DATE = `awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog`
COVERITY_EMAIL = bfriesen@simple.dallas.tx.us
COVERITY_TARBALL = libtiff.xz
COVERITY_VERSION = devel-${PACKAGE_CHANGE_DATE}
COVERITY_DESCRIPTION = 'libtiff development'
all: all-recursive
.SUFFIXES:
@ -395,15 +461,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -474,14 +539,13 @@ uninstall-pkgconfigDATA:
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@ -502,31 +566,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
cscopelist-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@ -542,12 +588,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@ -559,15 +600,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@ -576,18 +613,16 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscope.files: clean-cscope cscopelist-recursive cscopelist
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@ -604,7 +639,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -669,7 +707,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@ -684,12 +722,22 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
@ -706,7 +754,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@ -716,22 +764,26 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@ -892,34 +944,57 @@ ps-am:
uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
cscopelist-recursive ctags-recursive install-am install-strip \
tags-recursive
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-cscope \
clean-generic clean-libtool cscope cscopelist \
cscopelist-recursive ctags ctags-recursive dist dist-all \
dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-dist_docDATA install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-pkgconfigDATA install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-dist_docDATA uninstall-pkgconfigDATA
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dist_docDATA install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-dist_docDATA uninstall-pkgconfigDATA
.PRECIOUS: Makefile
distcheck-hook:
if [ -x "$(CMAKE)" ]; then \
mkdir $(distdir)/_build/cmake \
&& cd $(distdir)/_build/cmake \
&& cmake ../.. \
&& $(MAKE) \
&& ctest -V \
&& $(MAKE) DESTDIR=../../_inst/cmake install ; \
fi
rm -rf $(distdir)/_build/cmake
rm -rf $(distdir)/_inst/cmake
release:
(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
(rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION)
(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h)
coverity:
$(MAKE) clean
cov-build --dir cov-int $(MAKE)
tar caf $(COVERITY_TARBALL) cov-int
curl --limit-rate 50K \
--form token=`cat $$HOME/.coverity_key_tiff` \
--form email=$(COVERITY_EMAIL) \
--form file=@$(COVERITY_TARBALL) \
--form version=$(COVERITY_VERSION) \
--form description=$(COVERITY_DESCRIPTION) \
https://scan.coverity.com/builds?project=tiff
$(RM) $(COVERITY_TARBALL)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,4 +1,3 @@
# $Id: Makefile.vc,v 1.7 2008/01/01 15:53:10 fwarmerdam Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
@ -32,6 +31,9 @@
all: port lib tools
port::
cd libtiff
$(MAKE) /f Makefile.vc tif_config.h
cd..
cd port
$(MAKE) /f Makefile.vc
cd..

View file

@ -1,6 +1,3 @@
$Header: /cvs/maptools/cvsroot/libtiff/README,v 1.7 2012-02-18 21:53:27 bfriesen Exp $
TIFF Software Distribution
--------------------------
This file is just a placeholder; all the documentation is now in
@ -14,7 +11,7 @@ e.g.
If you don't have an HTML viewer then you can read the HTML source
or fetch a PostScript version of this documentation from the directory
ftp://ftp.remotesensing.org/pub/libtiff/
http://download.osgeo.org/libtiff/
If you can't hack either of these options then basically what you
want to do is:
@ -25,8 +22,21 @@ want to do is:
# make install
More information, email contacts, and mailing list information can be
found online at http://www.remotesensing.org/libtiff/.
found online at http://www.simplesystems.org/libtiff/
Source code repository
----------------------
[GitLab](https://gitlab.com/libtiff/libtiff)
Bug database
------------
[GitLab issues](https://gitlab.com/libtiff/libtiff/issues)
Previously, the project used
[Bugzilla](http://bugzilla.maptools.org/buglist.cgi?product=libtiff). This
is no longer in use, and all remaining issues have been migrated to GitLab.
Use and Copyright
-----------------

Some files were not shown because too many files have changed in this diff Show more