Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for the TIFF image reader #82

Open
wants to merge 102 commits into
base: master
Choose a base branch
from

Conversation

forman
Copy link

@forman forman commented Jan 15, 2015

No description provided.

dromagnoli and others added 30 commits May 25, 2011 14:18
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1264 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1271 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1272 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1275 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1284 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1286 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1289 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1295 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1299 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1303 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1304 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1314 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1336 866bbf7d-4862-ccf5-812a-c90ffd63a74d
git-svn-id: https://svn.java.net/svn/imageio-ext~svn/trunk@1338 866bbf7d-4862-ccf5-812a-c90ffd63a74d
dromagnoli and others added 24 commits October 28, 2013 17:16
Added png encoder and minor modifications on the ImageOutputStream
lveci and others added 4 commits July 11, 2019 16:11
* Ticket geosolutions-it#84: StringToDouble converter proper reset after computing a value

* Ticket geosolutions-it#83: Setting noData value

* [Issue93] Add GDAL Raster Mask band support

* introducing ImageWriter impl + minor fixes

* fixed missing dependency

* Update PNGImageWriter.java

*  geosolutions-it#192, minor clean up in turbojpeg

* geosolutions-it#101, pushing back inefficient but correct approach for precompressing

* fixing build

* Create .travis.yml

* geosolutions-it#107 Dispose image compressors/decompressors along with the reader

* JDK6 build out, no longer supported, JDK8 build in

* Update LICENSE.txt

* Release early tiff metadata and friends, the reader can get into the finalizer queue when imageio deferred loading is used, if that happens we don't want to carry around baggage

* Issue#113: Supporting emptyTiles and noData fill

# Conflicts:
#	plugin/tiff/src/main/java/it/geosolutions/imageio/plugins/tiff/TIFFDecompressor.java

* Removing auto-close of stream on reader.dispose which makes ImageIO.read Unhappy

* Issue117: TIFF LZW/DEFLATE Decompressor doesn't support 16 bits for Horizontal differencing Predictor (geosolutions-it#119)

* TIFF/LZW decoder, predictor for 16-bit samples
Horizontal differencing Predictor supports decoding of 16-bit samples if
all channels are 16-bit wide.
* Issue#117: Fixing TIFF LZW/Deflate decompressor supporting 16 bit horizontal diff predictor + Tests

* update version 1.2.1-SENTBX

* replaced 1.2.1-SENTBX by replaced 1.2.1-SNAP
added snap maven repository
set code version to 1.8

* set version 1.2.2-SNAPSHOT

* set version 1.2.2-SNAPSHOT

* removed some repositories

* set version to 1.2.3-SNAPSHOT
removed jaxb-api dependencies, caused problems in snap build

* set version to 1.2.3-SNAPSHOT
removed jaxb-api dependencies, caused problems in snap build

* set version to 1.2.4-SNAPSHOT
* [Issue93] Add GDAL Raster Mask band support

# Conflicts:
#	plugin/tiff/src/main/java/it/geosolutions/imageioimpl/plugins/tiff/TIFFImageReader.java
#	plugin/tiff/src/test/java/it/geosolutions/imageio/tiff/TIFFReadTest.java

* geosolutions-it#107 Dispose image compressors/decompressors along with the reader

# Conflicts:
#	plugin/tiff/src/main/java/it/geosolutions/imageio/plugins/tiff/TIFFDecompressor.java
#	plugin/tiff/src/main/java/it/geosolutions/imageioimpl/plugins/tiff/TIFFImageReader.java

* adding travis support for this branch

# Conflicts:
#	.travis.yml

* JDK6 build out, no longer supported, JDK8 build in

* Release early tiff metadata and friends, the reader can get into the finalizer queue when imageio deferred loading is used, if that happens we don't want to carry around baggage

* Issue#113: Supporting emptyTiles and noData fill

# Conflicts:
#	plugin/tiff/src/main/java/it/geosolutions/imageio/plugins/tiff/PrivateTIFFTagSet.java
#	plugin/tiff/src/main/java/it/geosolutions/imageio/plugins/tiff/TIFFDecompressor.java
#	plugin/tiff/src/test/java/it/geosolutions/imageio/tiff/TIFFReadTest.java

* Removing auto-close of stream on reader.dispose which makes ImageIO.read Unhappy

* Issue117: TIFF LZW/DEFLATE Decompressor doesn't support 16 bits for Horizontal differencing Predictor (geosolutions-it#119) (geosolutions-it#120)

* TIFF/LZW decoder, predictor for 16-bit samples
Horizontal differencing Predictor supports decoding of 16-bit samples if
all channels are 16-bit wide.
* Issue#117: Fixing TIFF LZW/Deflate decompressor supporting 16 bit horizontal diff predictor + Tests

* geosolutions-it#121-Add bands support to EnhancedImageReadParam

* pass in sourceBands

* Release early tiff metadata and friends, the reader can get into the finalizer queue when imageio deferred loading is used, if that happens we don't want to carry around baggage

# Conflicts:
#	plugin/tiff/src/main/java/it/geosolutions/imageioimpl/plugins/tiff/TIFFImageReader.java

* Issue#113: Supporting emptyTiles and noData fill

# Conflicts:
#	plugin/tiff/src/main/java/it/geosolutions/imageio/plugins/tiff/TIFFDecompressor.java
#	plugin/tiff/src/test/java/it/geosolutions/imageio/tiff/TIFFReadTest.java

* Removing auto-close of stream on reader.dispose which makes ImageIO.read Unhappy

* Issue117: TIFF LZW/DEFLATE Decompressor doesn't support 16 bits for Horizontal differencing Predictor (geosolutions-it#119) (geosolutions-it#120)

* TIFF/LZW decoder, predictor for 16-bit samples
Horizontal differencing Predictor supports decoding of 16-bit samples if
all channels are 16-bit wide.
* Issue#117: Fixing TIFF LZW/Deflate decompressor supporting 16 bit horizontal diff predictor + Tests

* 123 Adding VRT support and JUnit tests (geosolutions-it#126) (geosolutions-it#128)

# Conflicts:
#	plugin/gdal/pom.xml

* Improvements to Ant release.xml

Improve Ant release script to support SSH key and custom SSH port

# Conflicts:
#	release.xml

* Removing the Oracle JDK 7 build

Travis no longer supports it

* Removing matlab5 related modules (geosolutions-it#142)

# Conflicts:
#	library/pom.xml
#	plugin/pom.xml

* Dereference EnhancedRandomAccessFiles and memory buffers on imageinputstream geosolutions-it#139

* Fixing compiler version

# Conflicts:
#	pom.xml

* Tentative fix of the test failures

* Expose nodata value as part of the core common metadata geosolutions-it#136

# Conflicts:
#	.gitignore

* ASRP/USRP format support

* Adding headless flag in build

# Conflicts:
#	pom.xml

* Ignoring ECW tests, see geosolutions-it#148

* Adding GEN suffix to supported extensions

* Excluding ECW-JP2K tests the hard way (@ignore would not work). See geosolutions-it#148

* Switching URLs to https

# Conflicts:
#	pom.xml

* SecurityClassification not properly set

* geosolutions-it#131: gdalgeotiff as a test dependency in VRT

* geosolutions-it#149: Supporting tEXt chunk

* geosolutions-it#79: SPI registration and plugins ordering

* geosolutions-it#152: allows TurboJPEG writer exclusion

* Kakadu stream metadata XMLBoxMetadataNode fails to return the actual XML geosolutions-it#155

* geosolutions-it#116: Fixing ABGR + GrayAlpha encoding after bandSelect

# Conflicts:
#	plugin/png/src/test/java/it/geosolutions/imageioimpl/plugins/png/GrayAlpha8bitTest.java

* createInputStreamInstance(...) method in URLImageInputStreamSpi needs to handle null from ImageIOUtilities.urlToFile(sourceURL), fixes geosolutions-it#162

* Remove parent-snapshot version from standalone turbojpeg wrapper jar

# Conflicts:
#	library/libjpegturbo/pom.xml

* Updating the turbojpeg wrapper pom

* geosolutions-it#164 TIFF ExtraSample management

* geosolutions-it#168: TIFFJpegDecompressor sending the whole stream to TurboJPEG decoder

* Optimize scalability and performance of decimation op

* Reading images with the turbojpeg extension can clog up the finalizer queue geosolutions-it#212

* geosolutions-it#158 Support renamed GDAL 2.3.0 'gdalalljni' binding - backport to 1.1.x

# Conflicts:
#	library/gdalframework/src/main/java/it/geosolutions/imageio/gdalframework/GDALUtilities.java

* Cleanup obsolete poms

# Conflicts:
#	library/jmatio/pom.xml
#	plugin/matlab/pom.xml

* Make imageio-ext build on java11

# Conflicts:
#	library/geocore/pom.xml
#	pom.xml

* Upgrading JAXB to remove illegal reflective access issues (aligns it with geotools/geoserver

# Conflicts:
#	pom.xml

* JDK11 - fix jaxb version number

* Remove codehaus repo

# Conflicts:
#	pom.xml

* Do not use a JDK internal class

* Removing illegal access from image input streams

* Cleaning up repositories

# Conflicts:
#	pom.xml

* Fixing wrong className for imageOutputStream

* geosolutions-it#177: RasterByte skipping bytes provider

* ClientStreamAbortedException logged at SEVERE level, should be at lower level
geosolutions-it#181

* issue-185: FileImageInputStream improvements: fileChecks remove and fileChannel flag restore

* issue-190: Skip external files lookup

* geosolutions-it#58 Support for floating point predictor (type 3) in TIFF Deflate decompressor.

* Update to GDAL 2.x bindings geosolutions-it#198

# Conflicts:
#	library/gdalframework/src/main/java/it/geosolutions/imageio/gdalframework/GDALUtilities.java
#	pom.xml

* AsciiGridsImageReader closes the image input stream on reset, breaks GeoTools image mosaic geosolutions-it#195

* Moving skip lookup flag to utility class

* Restoring vecmath version being changed by jenkins as part of sed replace

# Conflicts:
#	plugin/unidata-netcdf/netcdfconverters/pom.xml

* Restoring vecmath version being changed by jenkins as part of sed replace: 2nd part

# Conflicts:
#	library/netcdf-core/pom.xml
#	pom.xml

* Fix off-by-one errors in ascii grid pixel sampling

Out of order tile cache look ups could ended up being off-by-one and losing
their first digit.  It is now more careful with handling whitespace when
marking indexes

Thanks to Andrea Aime for assistance with the JAI library

* Adding support for GDAL scale/offset metadata

* Upgrade junit to 4.12

# Conflicts:
#	pom.xml

* Check JNI and Native library versions when loading Kakadu

Add utility methods to KakaduUtilities to return the
version strings returned by both the JNI and the native
libraries and issue a warning if there's a version mismatch
when loading the native library.

* Enable running with Kakadu 7.x and lower versions of the library

Due to a binary incompatibility in kdu_jni.jar between
versions 7.x and lower, JP2KKakaduImageWriter delegates
to KakaduUtilities.initializeRGBChannels()
when it gets an IndexColorModel to set up the Jp2_channels,
which uses reflection to invoke Jp2_channels.Set_colour_mapping()
with the correct number of arguments depending on the
Kakadu JNI library version.

JP2KKakaduWriteTest is updated to use org.junit.Assume to
skip tests based on the availability of kakadu's native
library, and also to skip those tests that

* Re-enable failing JP2KKakaduWriteTest tests with Kakady 7.x

kdu_jni.Siz_params.Parse_string("Qstep=0.0000152588") fails
on 7.x. The tests that reached that call (by means of
JP2KKakaduImageWriter.initializeCodestream(...)) were ignored.

This patch implements a work around given that by Kakadu 7.10
release notes (http://kakadusoftware.com/version-notes/version-7-10/)
omiting this parameters seems safe.

* Test KakaduUtilities.initializeRGBChannels()

Add KakaduUtilitiesTest to verify the correct calls
to kdu_jni.Jp2_channels.Set_colour_mapping() are
performed depending on the kdu_jni.jar version
available.

The tests don't require the native library to be
present, so they can be run with different JNI
library versions.

e.g.:

mvn test -Dkakadu.version=5.2.6
mvn test -Dkakadu.version=7.10.6

regardless of which/if the native library is installed

# Conflicts:
#	pom.xml

* Renamed pom version 1.3.2

# Conflicts:
#	library/gdalframework/pom.xml
#	library/geocore/pom.xml
#	library/imagereadmt/pom.xml
#	library/pom.xml
#	library/streams/pom.xml
#	library/test-data/pom.xml
#	library/utilities/pom.xml
#	plugin/arcgrid/pom.xml
#	plugin/gdal/gdalarcbinarygrid/pom.xml
#	plugin/gdal/gdalarcgrid/pom.xml
#	plugin/gdal/gdalbsb/pom.xml
#	plugin/gdal/gdaldoq1/pom.xml
#	plugin/gdal/gdaldoq2/pom.xml
#	plugin/gdal/gdaldted/pom.xml
#	plugin/gdal/gdalecw/pom.xml
#	plugin/gdal/gdalecwjp2/pom.xml
#	plugin/gdal/gdalehdr/pom.xml
#	plugin/gdal/gdalenvihdr/pom.xml
#	plugin/gdal/gdalenvisat/pom.xml
#	plugin/gdal/gdalerdasimg/pom.xml
#	plugin/gdal/gdalgeotiff/pom.xml
#	plugin/gdal/gdalhdf4/pom.xml
#	plugin/gdal/gdalidrisi/pom.xml
#	plugin/gdal/gdaljpeg/pom.xml
#	plugin/gdal/gdalkakadujp2/pom.xml
#	plugin/gdal/gdalmrsid/pom.xml
#	plugin/gdal/gdalmrsidjp2/pom.xml
#	plugin/gdal/gdalnitf/pom.xml
#	plugin/gdal/gdalrpftoc/pom.xml
#	plugin/gdal/gdalsrp/pom.xml
#	plugin/gdal/gdalvrt/pom.xml
#	plugin/gdal/gdalwcs/pom.xml
#	plugin/gdal/gdalwms/pom.xml
#	plugin/gdal/pom.xml
#	plugin/jmagickjpeg/pom.xml
#	plugin/kakadujp2/pom.xml
#	plugin/nitronitf/pom.xml
#	plugin/png/pom.xml
#	plugin/pnm/pom.xml
#	plugin/pom.xml
#	plugin/tiff/pom.xml
#	plugin/turbojpeg/pom.xml
#	plugin/unidata-netcdf/grib1/pom.xml
#	plugin/unidata-netcdf/hdf4/pom.xml
#	plugin/unidata-netcdf/netcdf/pom.xml
#	plugin/unidata-netcdf/netcdfconverters/pom.xml
#	plugin/unidata-netcdf/pom.xml
#	pom.xml
#	release/pom.xml

* remove dupe gdal version

* update versions to 1.3.2-SNAP

* Update and rename readme.txt to README.md
# Conflicts:
#	README.md

* broke code up into separate modules

* removed ds_store files

* converted http range reader to use okhttp; working azure reader

* implemented CogUri source

* fixed refactoring bugs

* added cache test

* added maven build profiles

* updated docs; added ability to read reagion for s3 from url param

* updated profile names

* removed test class

* final cleanup

* removed .DS_Store files; replaced print statements with logging

* modifications per @aaime peer review

* removed azure support due to unstable library support

* PR 211 - final updates

* moved header length source from CogTileInfo to CogImageReadParam

* added canDecodeInput method to image reader spi

* added anonymous s3 support; added online profile for tests

* fixing Oracle JDK8 Failure, by adding ubuntu trusty as dist

* support requestPayer

* allow Float64

* update versions to 1.3.3-SNAP

* added profile to be able to deploy to snap repository (deploysnap)

* removed test scope from imageio-ext-streams dependency
ImageOutputStreamAdapter is used in PNGImageWriterSPI

* added snap repository for plugins

Co-authored-by: n-lagomarsini <lago.88@libero.it>
Co-authored-by: Andrea Aime <andrea.aime@gmail.com>
Co-authored-by: Daniele Romagnoli <daniele.romagnoli@geo-solutions.it>
Co-authored-by: ugomos <ugomoschini@gmail.com>
Co-authored-by: Alessandro Parma <randomorder@users.noreply.github.com>
Co-authored-by: Johannes Weskamm <weskamm@terrestris.de>
Co-authored-by: Tiago Vieira <tixvieira@gmail.com>
Co-authored-by: Krzysztof Szafrański <krzysztof.szafranski@sharpershape.com>
Co-authored-by: Nick Griffiths <nickg@catalyst.net.nz>
Co-authored-by: Gabriel Roldan <gabriel.roldan@gmail.com>
Co-authored-by: Hudson <geosolutions@geo-solutions.it>
Co-authored-by: Josh Fix <josh@federal.planet.com>
Co-authored-by: Marco Peters <marco.peters@brockmann-consult.de>
* default hasAlpha to true as it used to be

* update version
* set intermediate version

* FiX: TIFFLZWDecompressor Null Pointer Exception
taken from jai-imageio/jai-imageio-core#39

Issue geosolutions-it#37 support for LSB LWZ compressed TIFF

* synchronised super.decode() call to try to avoid NPE

java.lang.NullPointerException
	at it.geosolutions.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2925)
	at it.geosolutions.imageioimpl.plugins.tiff.TIFFNullDecompressor.decode(TIFFNullDecompressor.java:174)
	at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1798)

* set version to 1.3.3.2-SNAP

Co-authored-by: Luca Bellonda <lbellonda@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants