Commit Graph

109 Commits

Author SHA1 Message Date
zcronix 1328dbf763 Handle lossless JPEG with non-zero point transform (#1183)
* Handle lossless JPEG with non-zero point transform (Pt parameter)
* Add unit test
* Inserting a fix for last pixel not being output
* Address issues from code review

---------

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
2025-10-03 10:49:40 +02:00
Harald Kuhr 9610256ddb #1058: JPEG fix ClassCastException for Unknown segments 2024-11-19 10:36:12 +01:00
Vyshak Puthusseri 543acce8a3 Upgrade to Junit5 (#1050)
* chore: Update to junit5 for servlet package

* chore: Update to junit5 for contrib package

* chore: Update to junit5 for common-image package

* chore: Update to junit5 for common-lang package

* chore: Update to junit5 for entire project files

* fix: test case for JPEGImageReaderTest failed for java 8 and 11

assertEquals was using old signature of junit4.

* Update common/common-io/src/test/java/com/twelvemonkeys/io/InputStreamAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update common/common-io/src/test/java/com/twelvemonkeys/io/InputStreamAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-bmp/src/test/java/com/twelvemonkeys/imageio/plugins/bmp/BMPImageReaderTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-jpeg/src/test/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGImageReaderTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageMetadataTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageReaderTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageWriterTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/stream/BufferedChannelImageInputStreamTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/stream/BufferedChannelImageInputStreamTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* refactor: few indentation changes and missed test case

- review change related to missing test annotation
- unwanted new lines inside test case
- duplicate assertions

* refactor: moved the lambda expression to method reference

* review: testNotNullWithParameterNull catch block was never executed.

Added the suggested change

* Apply suggestions from code review

chore: adjust suggested indentation

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageReaderAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageReaderAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageWriterAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* refactor: using assertTimeout doesnot kill the execution, even if the timeout happens.

It is better to use assertTimeoutPreemptively in cases, where we really want to kill the execution after timeout.
https://stackoverflow.com/questions/57116801/how-to-fail-a-test-after-a-timeout-is-exceeded-in-junit-5/57116959#57116959

---------

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
2024-11-12 10:13:15 +01:00
Harald Kuhr d1df8c13ed Remove outdated TODO 2023-10-25 22:14:54 +02:00
Harald Kuhr 031937fe99 #852 JPEG: Preserve existing metadata when writing CMYK data 2023-10-25 22:14:05 +02:00
Harald Kuhr 9a6b8c9bfe Fix for IIOInvalidTreeException: Invalid DHT node #559 2022-01-12 19:33:21 +01:00
Gauthier 5617b4323c Make tests pass on JDK 16 and 17 (#635)
* make tests pass on JDK 16 and 17
replace deprecated mockito-all by mockito-core, and updated to latest 3.x
replace deprecated org.mockito.Matchers

* code cleanup from IDE suggestions

* add oracle jdk 16 and 17 to Travis
2021-10-26 18:38:33 +02:00
Harald Kuhr 0151efb5f6 #573: License headers too. 2021-04-10 18:15:27 +02:00
Harald Kuhr bd796429c5 #573: Better naming: LuminanceToGray 2021-04-10 18:14:09 +02:00
Harald Kuhr 419ffc9373 #573: Always return RAWImageType for JPEG.
+ Bonus: Fix luma to gray conversion
2021-04-10 11:44:09 +02:00
Harald Kuhr ba0bb7b903 #595 Avoid infinite loop on corrupted JPEG stream 2021-03-06 14:15:44 +01:00
Harald Kuhr 0286fa4268 JPEG Exif/thumbnail refactoring pt II. 2021-02-26 18:27:58 +01:00
Harald Kuhr 85fb9e6af3 JPEG Exif/thumbnail refactoring 2021-02-26 17:13:16 +01:00
Harald Kuhr ebaa69713f Deprecate for BufferedImageInputStream, now using buffered streams directly in all readers. 2021-01-11 22:07:31 +01:00
Harald Kuhr 73044bea58 #292 Now builds on Java 8, 11 and 15. 2020-12-02 22:08:40 +01:00
Harald Kuhr 6ffcb88872 Verify that RGB data is correct. 2020-10-16 18:21:40 +02:00
Harald Kuhr 960e764c7b Added test to verify how to write CMYK JPEG without ICC profile. 2020-10-16 18:19:08 +02:00
Harald Kuhr 6c34fb211f ImageWriterAbstractTest refactorings. 2020-10-14 18:54:46 +02:00
Harald Kuhr 9fdbc3b1fc ImageReaderAbstractTest refactorings. 2020-10-14 17:06:35 +02:00
Harald Kuhr 107da17ca9 Dependabot broke my build... 2020-10-13 19:16:58 +02:00
Harald Kuhr e6bd94025f JPEG Metadata clean-up 2020-07-10 22:26:53 +02:00
Harald Kuhr 330a0414f0 Fix JPEG tests 2020-07-10 22:26:12 +02:00
Harald Kuhr 5cc201b46d JPEG Exif rotation in metadata + support 2020-07-10 22:05:46 +02:00
Harald Kuhr ee049d9465 #488: Fix for AIOOBE in getEmbeddedICCProfile when ICC profile is empty 2019-08-07 16:18:01 +02:00
Harald Kuhr 24c6682236 #311 Updated license headers to be the same as in the LICENSE.txt 2018-08-18 19:22:52 +02:00
Harald Kuhr 6f9c83a0a9 #433: Test case for offset issue. 2018-08-18 13:17:43 +02:00
Harald Kuhr 2235f6c911 #202, #433: Fixes offset issues when reading multiple JPEGs from single stream + embedded case (ie. TIFF). 2018-08-18 13:08:17 +02:00
Harald Kuhr 7ab72f0161 #329 JPEGImageReader endless loop fix 2018-05-22 21:10:57 +02:00
Harald Kuhr 7bed5a1c9c #323: Minor optimization + changed warning message. 2018-03-06 23:47:51 +01:00
Harald Kuhr ee299ee577 API clean-up. 2018-03-06 23:22:45 +01:00
Harald Kuhr 15e39bce3f #323 JPEGSegmentImageInputStream now rewrites duplicate SOF/SOS ids.
And emits warnings when it applies rewrites.
2018-03-06 23:19:47 +01:00
Harald Kuhr 633e5cc6a2 #25 CMYK JPEG write support 2018-01-23 19:51:33 +01:00
Harald Kuhr 65a83d76e0 #25 CMYK JPEG write support 2018-01-23 19:50:44 +01:00
Harald Kuhr fb3c5f8440 Added test case for RGB JPEG
+ fixed an issue in getImageTypes to avoid incompatible conversion.
2018-01-05 12:49:54 +01:00
Harald Kuhr 73e4eb8627 #360 JPEG-LOSSLESS/jpeg-lossless now part of format names. 2017-12-19 19:52:25 +01:00
Harald Kuhr 6b966a2d4f Removed an unchecked cast. 2017-11-05 09:58:27 +01:00
Harald Kuhr 97cd8a955f #326: Support for JFIF JPEG with non-spec 8 bit grayscale thumbnail. 2017-02-27 20:58:23 +01:00
Harald Kuhr a86b76256b #204 TIFF metadata refactor 2016-12-12 22:28:22 +01:00
Harald Kuhr 7a0660c4d7 #297 JPEGLossless no supports AC tables only image + multiple tables images 2016-12-12 22:10:02 +01:00
Harald Kuhr 18705be7f6 #294 Fixed regression, reading JPEGs containing strange APPn markers without identifier string 2016-11-20 20:11:22 +01:00
Harald Kuhr ab13084f44 #292 Preparing for Java 9 compatibility + general clean-up 2016-11-15 21:40:59 +01:00
Harald Kuhr afd8b28617 #182: Added more test files or better coverage. 2016-09-28 13:01:07 +02:00
Harald Kuhr 7ac1589186 #182 Fixed bug in JFXXThumbnailReaderTest 2016-09-09 13:59:03 +02:00
Harald Kuhr 673f3e5b53 #182 Massive refactorings to clean up metadata and segment handling 2016-09-09 13:59:03 +02:00
Harald Kuhr 15ce9d6b64 #182 Clean up after merge of #215 2016-09-09 13:59:03 +02:00
Harald Kuhr 13bea23550 #276 Fix DHT inconsistency 2016-08-09 11:47:25 +02:00
Harald Kuhr c18893184b #228: TIFFImageWriter now correctly writes images with sample model translation. 2016-07-07 15:27:08 +02:00
Harald Kuhr 478ed62cd1 Refactoring, pulling assertRGBEquals method up. 2016-06-30 14:15:29 +02:00
Harald Kuhr 054499b78a #269: Hopefully fix CI build again. :-) 2016-06-28 18:30:30 +02:00
Harald Kuhr b0eb668ed4 #269: Fixed an issue with CMYK colors as CMYK being off. 2016-06-28 18:18:15 +02:00