Skip to content

Commit

Permalink
Updated windows tiff reader
Browse files Browse the repository at this point in the history
  • Loading branch information
MattHazard committed Dec 17, 2022
1 parent 2e8f27e commit eec241d
Show file tree
Hide file tree
Showing 34 changed files with 137 additions and 15 deletions.
Binary file added PRTC/pReadTiffC.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion PRTC/testGccWin.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
gcc -fopenmp -fPIC -DPIC PRTC.c parallelReadTiff.c mallocDynamic.c -I"C:\jdk-19\include" -I"C:\jdk-19\include\win32" -I"C:\Users\mrmmu\Desktop\ptrFijiPlugin\tiff\include" -L"C:\Users\mrmmu\Desktop\ptrFijiPlugin\tiff\lib" -shared -static -o libpReadTiffC.dll -ltiff
gcc -fopenmp -fPIC -DPIC PRTC.c parallelReadTiff.c -I"C:\jdk-19\include" -I"C:\jdk-19\include\win32" -I"C:\Program Files (x86)\tiff\include" -L"C:\Program Files (x86)\tiff\lib" -shared -static -o pReadTiffC.dll -ltiff
Binary file modified PRTC/tiff/bin/fax2ps.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/fax2tiff.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/pal2rgb.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/ppm2tiff.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/raw2tiff.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiff.dll
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiff2bw.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiff2pdf.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiff2ps.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiff2rgba.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffcmp.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffcp.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffcrop.exe
Binary file not shown.
Binary file removed PRTC/tiff/bin/tiffd.dll
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffdither.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffdump.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffinfo.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffmedian.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffset.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffsplit.exe
Binary file not shown.
Binary file modified PRTC/tiff/bin/tiffxx.dll
Binary file not shown.
Binary file removed PRTC/tiff/bin/tiffxxd.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion PRTC/tiff/include/tiff.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ typedef enum {
/* compression codes 32908-32911 are reserved for Pixar */
#define COMPRESSION_PIXARFILM 32908 /* Pixar companded 10bit LZW */
#define COMPRESSION_PIXARLOG 32909 /* Pixar companded 11bit ZIP */
#define COMPRESSION_DEFLATE 32946 /* Deflate compression */
#define COMPRESSION_DEFLATE 32946 /* Deflate compression, legacy tag */
#define COMPRESSION_ADOBE_DEFLATE 8 /* Deflate compression,
as recognized by Adobe */
/* compression code 32947 is reserved for Oceana Matrix <[email protected]> */
Expand Down
4 changes: 2 additions & 2 deletions PRTC/tiff/include/tiffconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@
#define ZIP_SUPPORT 1

/* Support libdeflate enhanced compression */
/* #undef LIBDEFLATE_SUPPORT */
#define LIBDEFLATE_SUPPORT 1

/* Support strip chopping (whether or not to convert single-strip uncompressed
images to multiple strips of ~8Kb to reduce memory usage) */
#define STRIPCHOP_DEFAULT 1
#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP

/* Enable SubIFD tag (330) support */
#define SUBIFD_SUPPORT 1
Expand Down
8 changes: 6 additions & 2 deletions PRTC/tiff/include/tiffio.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ extern TIFFDataType TIFFFieldDataType(const TIFFField*);
extern int TIFFFieldPassCount(const TIFFField*);
extern int TIFFFieldReadCount(const TIFFField*);
extern int TIFFFieldWriteCount(const TIFFField*);
extern int TIFFFieldSetGetSize(const TIFFField*); /* returns internal storage size of TIFFSetGetFieldType in bytes. */
extern int TIFFFieldSetGetCountSize(const TIFFField*); /* returns size of count parameter 0=none, 2=uint16_t, 4=uint32_t */
extern int TIFFFieldIsAnonymous(const TIFFField *);

typedef int (*TIFFVSetMethod)(TIFF*, uint32_t, va_list);
typedef int (*TIFFVGetMethod)(TIFF*, uint32_t, va_list);
Expand Down Expand Up @@ -384,9 +387,10 @@ extern int TIFFIsByteSwapped(TIFF*);
extern int TIFFIsUpSampled(TIFF*);
extern int TIFFIsMSB2LSB(TIFF*);
extern int TIFFIsBigEndian(TIFF*);
extern int TIFFIsBigTIFF(TIFF*);
extern TIFFReadWriteProc TIFFGetReadProc(TIFF*);
extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
extern TIFFCloseProc TIFFGetCloseProc(TIFF*);
extern TIFFSizeProc TIFFGetSizeProc(TIFF*);
extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*);
Expand Down Expand Up @@ -483,7 +487,7 @@ extern tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32_t strip, void* data, tms
extern tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32_t strip, void* data, tmsize_t cc);
extern tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32_t tile, void* data, tmsize_t cc);
extern tmsize_t TIFFWriteRawTile(TIFF* tif, uint32_t tile, void* data, tmsize_t cc);
extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */
extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths within TIFF file. */
extern void TIFFSetWriteOffset(TIFF* tif, toff_t off);
extern void TIFFSwabShort(uint16_t*);
extern void TIFFSwabLong(uint32_t*);
Expand Down
4 changes: 2 additions & 2 deletions PRTC/tiff/include/tiffvers.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.3.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.4.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
/*
* This define can be used in code that requires
* compilation-related definitions specific to a
* version or versions of the library. Runtime
* version checking should be done based on the
* string returned by TIFFGetVersion.
*/
#define TIFFLIB_VERSION 20210416
#define TIFFLIB_VERSION 20220520
19 changes: 19 additions & 0 deletions PRTC/tiff/lib/cmake/tiff/TiffTargets-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "TIFF::tiff" for configuration "Release"
set_property(TARGET TIFF::tiff APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(TIFF::tiff PROPERTIES
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/tiff.lib"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/tiff.dll"
)

list(APPEND _cmake_import_check_targets TIFF::tiff )
list(APPEND _cmake_import_check_files_for_TIFF::tiff "${_IMPORT_PREFIX}/lib/tiff.lib" "${_IMPORT_PREFIX}/bin/tiff.dll" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
98 changes: 98 additions & 0 deletions PRTC/tiff/lib/cmake/tiff/TiffTargets.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Generated by CMake

if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.22)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS TIFF::tiff)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)


# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()

# Create imported target TIFF::tiff
add_library(TIFF::tiff SHARED IMPORTED)

# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/TiffTargets-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)

# Cleanup temporary variables.
set(_IMPORT_PREFIX)

# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)

# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
15 changes: 8 additions & 7 deletions PRTC/tiff/lib/pkgconfig/libtiff-4.pc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
prefix=C:/Program Files (x86)/tiff
exec_prefix=C:/Program Files (x86)/tiff
libdir=C:/Program Files (x86)/tiff/lib
includedir=C:/Program Files (x86)/tiff/include
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libtiff
Description: Tag Image File Format (TIFF) library.
Version:
Libs: -LC:/Program Files (x86)/tiff/lib -ltiff
Libs.private:
Cflags: -IC:/Program Files (x86)/tiff/include
Version: 4.4.0
Libs: -L${libdir} -ltiff
Libs.private: -ldeflate
Cflags: -I${includedir}
Requires.private: zlib libzstd
Binary file modified PRTC/tiff/lib/tiff.lib
Binary file not shown.
Binary file removed PRTC/tiff/lib/tiffd.lib
Binary file not shown.
Binary file modified windows/Parallel_Fiji_Visualizer_lib/pReadTiffC.dll
Binary file not shown.

0 comments on commit eec241d

Please sign in to comment.