Compare commits

...

97 Commits

Author SHA1 Message Date
Harald Kuhr 7fb443a768 #1234: Javadoc in parallell 2026-02-26 10:30:29 +01:00
Harald Kuhr b302b4f0d1 #1234: Fix... 2026-02-26 09:26:55 +01:00
Harald Kuhr 29dcf83c47 #1234: Simplify build matrix 2026-02-26 09:25:33 +01:00
Harald Kuhr d54d84371d #1234: Fixed JavaDoc for Java 21 + JavaDoc verification step 2026-02-25 21:02:44 +01:00
Harald Kuhr 4de2a38dd8 New version + snapshot fix 2026-02-23 10:05:29 +01:00
Harald Kuhr 5b4fa64dc0 [maven-release-plugin] prepare for next development iteration 2026-02-22 16:13:49 +01:00
Harald Kuhr 2ad522a9fa [maven-release-plugin] prepare release twelvemonkeys-3.13.1 2026-02-22 16:13:44 +01:00
dependabot[bot] 20af575fbd Bump github/codeql-action from 4.31.10 to 4.32.2 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.10 to 4.32.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdefb33c0f6224e58673d9004f47f7cb3e328b89...45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-13 11:08:19 +01:00
dependabot[bot] 02a6ed1ac1 Bump mikepenz/action-junit-report in /.github/workflows
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/a294a61c909bd8a4b563024a2faa28897fd53ebc...74626db7353a25a20a72816467ebf035f674c5f8)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 10:28:21 +01:00
Harald Kuhr 146d5926bb #1244: Created test + fixed inverted PSD hidden flag in metadata 2026-02-05 13:54:51 +01:00
dependabot[bot] 561b25022c Bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.14.1 to 3.15.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.1...maven-compiler-plugin-3.15.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.15.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-03 11:09:22 +01:00
dependabot[bot] 4cd6b893de Bump actions/setup-java from 5.1.0 to 5.2.0 in /.github/workflows
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/f2beeb24e141e01a676f977032f5a29d81c9e27e...be666c2fcd27ec809703dec50e508c2fdc7f6654)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 13:45:17 +01:00
dependabot[bot] dabff3abce Bump actions/checkout from 6.0.1 to 6.0.2 in /.github/workflows
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8e8c483db84b4bee98b60c0593521ed34d9990e8...de0fac2e4500dabe0009e67214ff5f5447ce83dd)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-23 09:50:45 +01:00
Will Ezell 1b889b1b4b Fixes Lossless Alpha Channel WebP (#1243)
* Fix alpha channel dimensions in WebP lossless decoding

  Use the expected width and height values instead of tempRaster.getWidth()/getHeight() when creating the alpha channel's writable child raster. This ensures the alpha channel is correctly sized when the temp raster dimensions differ from the expected dimensions.

* Fixes Lossless Huffman table based on libwebp

* Remove redundant flush call in image reader test

Removed unnecessary image.flush() call in WebPImageReaderTest.

* adding code to generate good hash for reproducability
2026-01-23 09:40:06 +01:00
dependabot[bot] 29a3bd591d Bump github/codeql-action from 4.31.9 to 4.31.10 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.9 to 4.31.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/5d4e8d1aca955e8d8589aabd499c5cae939e33c7...cdefb33c0f6224e58673d9004f47f7cb3e328b89)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-20 13:25:57 +01:00
Harald Kuhr cd79ef4409 #1240: Fixes TIFFWriter overwrite of nested values issue 2026-01-15 19:42:56 +01:00
dependabot[bot] a604cb83fb Bump org.sonatype.central:central-publishing-maven-plugin
Bumps [org.sonatype.central:central-publishing-maven-plugin](https://github.com/sonatype/central-publishing-maven-plugin) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/sonatype/central-publishing-maven-plugin/commits)

---
updated-dependencies:
- dependency-name: org.sonatype.central:central-publishing-maven-plugin
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-15 10:50:33 +01:00
dependabot[bot] eb1735ab33 Bump junit.jupiter.version from 5.14.1 to 5.14.2
Bumps `junit.jupiter.version` from 5.14.1 to 5.14.2.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.14.1 to 5.14.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.1...r5.14.2)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.14.1 to 5.14.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.1...r5.14.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-14 11:25:14 +01:00
dependabot[bot] 357eeb2236 Bump mikepenz/action-junit-report in /.github/workflows
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/e08919a3b1fb83a78393dfb775a9c37f17d8eea6...a294a61c909bd8a4b563024a2faa28897fd53ebc)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 10:59:50 +01:00
dependabot[bot] d634b9d93f Bump github/codeql-action from 4.31.4 to 4.31.9 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.4 to 4.31.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e12f0178983d466f2f6028f5cc7a6d786fd97f4b...5d4e8d1aca955e8d8589aabd499c5cae939e33c7)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 22:18:20 +01:00
dependabot[bot] 7e3241d64b Bump org.sonatype.central:central-publishing-maven-plugin
Bumps [org.sonatype.central:central-publishing-maven-plugin](https://github.com/sonatype/central-publishing-maven-plugin) from 0.7.0 to 0.9.0.
- [Commits](https://github.com/sonatype/central-publishing-maven-plugin/commits)

---
updated-dependencies:
- dependency-name: org.sonatype.central:central-publishing-maven-plugin
  dependency-version: 0.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 10:53:27 +01:00
Harald Kuhr b86d82720d [maven-release-plugin] prepare for next development iteration 2025-12-22 15:40:16 +01:00
Harald Kuhr 47e90a657a [maven-release-plugin] prepare release twelvemonkeys-3.13.0 2025-12-22 15:40:12 +01:00
Harald Kuhr bdd8b2f1fb #1198: Fix snapshot URL 2025-12-22 12:10:29 +01:00
Harald Kuhr 8d08c9565b Fix JavaDoc error 2025-12-22 10:08:43 +01:00
Harald Kuhr c11f61d132 #1198: Re-enable snapshot builds 2025-12-22 10:02:16 +01:00
Harald Kuhr e6b38cb547 #1198: Migrate from ossrh to central 2025-12-22 09:56:19 +01:00
dependabot[bot] e11d888809 Bump actions/upload-artifact from 5.0.0 to 6.0.0 in /.github/workflows
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/330a01c490aca151604b8cf639adc76d48f6c5d4...b7c566a772e6b6bfb58ed0dc250532a479d7789f)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 09:47:16 +01:00
KhanhTypo 46a399ff02 DDS DXT10 support, with some certain supported DXGI Formats only. (#1230)
* dds dxt10 support, with some certain supported DXGI Formats only.
* expand the supporting range for some DX10 DXGI Format in the DXGI_FORMAT enumeration
* readability and maintainability fixes, adding DXT10 test cases.
* java.awt.* -> java.awt.Dimension
2025-12-17 17:38:47 +01:00
dependabot[bot] a09629be32 Bump org.apache.maven.plugins:maven-release-plugin from 3.3.0 to 3.3.1
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.3.0...maven-release-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-version: 3.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 17:22:29 +01:00
dependabot[bot] 57fb1ca1bb Bump actions/setup-java from 5.0.0 to 5.1.0 in /.github/workflows
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/dded0888837ed1f317902acf8a20df0ad188d165...f2beeb24e141e01a676f977032f5a29d81c9e27e)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 15:42:49 +01:00
Vincent Privat c9063ca02d add unit test 2025-12-09 13:25:26 +01:00
Vincent Privat 340e79eb8a fix webp decoding using source region without subsampling 2025-12-09 13:25:26 +01:00
Vincent Privat 355a916225 Optimize buffer by allocating enough space up front 2025-12-09 13:24:39 +01:00
Vincent Privat 8da45b5f05 take code review into account 2025-12-09 13:24:39 +01:00
Vincent Privat 6c8b0cdc2f Fix #1211 - SVG: support namespace prefix 2025-12-09 13:24:39 +01:00
dependabot[bot] 8af219e669 Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.2 to 3.5.0.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.2...maven-jar-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 13:23:04 +01:00
dependabot[bot] 7e10b9242d Bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0
Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/apache/maven-source-plugin/releases)
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.1...maven-source-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 13:22:51 +01:00
dependabot[bot] 36103046a5 Bump org.apache.maven.plugins:maven-resources-plugin from 3.3.1 to 3.4.0
Bumps [org.apache.maven.plugins:maven-resources-plugin](https://github.com/apache/maven-resources-plugin) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/apache/maven-resources-plugin/releases)
- [Commits](https://github.com/apache/maven-resources-plugin/compare/maven-resources-plugin-3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-resources-plugin
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 13:22:38 +01:00
dependabot[bot] 95787449ea Bump org.apache.maven.plugins:maven-release-plugin from 3.2.0 to 3.3.0
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.2.0...maven-release-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 13:22:21 +01:00
dependabot[bot] 3223743f2c Bump actions/checkout from 5.0.0 to 6.0.1 in /.github/workflows
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/08c6903cd8c0fde910a37f88322edcfb5dd907a8...8e8c483db84b4bee98b60c0593521ed34d9990e8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 12:46:28 +01:00
dependabot[bot] 234c7f59d4 Bump github/codeql-action from 4.31.3 to 4.31.4 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.3 to 4.31.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/014f16e7ab1402f30e7c3329d33797e7948572db...e12f0178983d466f2f6028f5cc7a6d786fd97f4b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 12:46:04 +01:00
Harald Kuhr 1cb0da2967 Add cooldown period for all dependencies, 7 days 2025-11-24 10:44:51 +01:00
dependabot[bot] d1525828fa Bump github/codeql-action from 4.31.2 to 4.31.3 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.2 to 4.31.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/0499de31b99561a6d14a36a5f662c2a54f91beee...014f16e7ab1402f30e7c3329d33797e7948572db)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 15:51:00 +01:00
dependabot[bot] 194fd5a446 Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.1.1...maven-release-3.2.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-version: 3.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 09:39:04 +01:00
dependabot[bot] 21e5a465b9 Bump commons-io:commons-io from 2.20.0 to 2.21.0
Bumps [commons-io:commons-io](https://github.com/apache/commons-io) from 2.20.0 to 2.21.0.
- [Changelog](https://github.com/apache/commons-io/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-io/compare/rel/commons-io-2.20.0...rel/commons-io-2.21.0)

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 09:33:25 +01:00
dependabot[bot] 6309bc5765 Bump mikepenz/action-junit-report in /.github/workflows
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/5b7ee5a21e8674b695313d769f3cbdfd5d4d53a4...e08919a3b1fb83a78393dfb775a9c37f17d8eea6)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 09:29:34 +01:00
dependabot[bot] 5011e98184 Bump junit.jupiter.version from 5.14.0 to 5.14.1
Bumps `junit.jupiter.version` from 5.14.0 to 5.14.1.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 09:25:22 +01:00
dependabot[bot] a9aa5cc66e Bump github/codeql-action from 4.31.0 to 4.31.2 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.0 to 4.31.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/4e94bd11f71e507f7f87df81788dff88d1dacbfb...0499de31b99561a6d14a36a5f662c2a54f91beee)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-02 13:24:13 +01:00
dependabot[bot] ac107196eb Bump github/codeql-action from 4.30.9 to 4.31.0 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.30.9 to 4.31.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/16140ae1a102900babc80a33c44059580f687047...4e94bd11f71e507f7f87df81788dff88d1dacbfb)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 10:03:26 +01:00
dependabot[bot] 489a419df1 Bump actions/upload-artifact from 4.6.2 to 5.0.0 in /.github/workflows
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...330a01c490aca151604b8cf639adc76d48f6c5d4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 09:35:37 +01:00
dependabot[bot] 51891b45ea Bump github/codeql-action from 4.30.8 to 4.30.9 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.30.8 to 4.30.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f443b600d91635bebf5b0d9ebc620189c0d6fba5...16140ae1a102900babc80a33c44059580f687047)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.30.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 11:16:14 +02:00
dependabot[bot] 90e60f509d Bump mikepenz/action-junit-report in /.github/workflows
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 5.6.2 to 6.0.0.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/3585e9575db828022551b4231f165eb59a0e74e3...5b7ee5a21e8674b695313d769f3cbdfd5d4d53a4)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 11:50:22 +02:00
dependabot[bot] 53e5eff0c9 Bump github/codeql-action from 4.30.7 to 4.30.8 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.30.7 to 4.30.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e296a935590eb16afc0c0108289f68c87e2a89a5...f443b600d91635bebf5b0d9ebc620189c0d6fba5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.30.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 11:49:53 +02:00
dependabot[bot] 8670e1fd8a Bump org.apache.maven.plugins:maven-pmd-plugin from 3.27.0 to 3.28.0
Bumps [org.apache.maven.plugins:maven-pmd-plugin](https://github.com/apache/maven-pmd-plugin) from 3.27.0 to 3.28.0.
- [Release notes](https://github.com/apache/maven-pmd-plugin/releases)
- [Commits](https://github.com/apache/maven-pmd-plugin/compare/maven-pmd-plugin-3.27.0...maven-pmd-plugin-3.28.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-pmd-plugin
  dependency-version: 3.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 10:34:48 +02:00
Harald Kuhr 6395fd33e9 Temporarily disable deploy 2025-10-09 09:13:53 +02:00
Harald Kuhr 0834a2b1be Fix JDK 8 name in CI output 2025-10-09 09:05:06 +02:00
Harald Kuhr 6c75661ab4 Update ci.yml 2025-10-09 09:00:16 +02:00
dependabot[bot] 9c25c962cc Bump github/codeql-action from 3.30.6 to 4.30.7 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.6 to 4.30.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/64d10c13136e1c5bce3e5fbde8d4906eeaafc885...e296a935590eb16afc0c0108289f68c87e2a89a5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.30.7
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 08:41:40 +02:00
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
dependabot[bot] 8bccdef371 Bump github/codeql-action from 3.30.5 to 3.30.6 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.5 to 3.30.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/3599b3baa15b485a2e49ef411a7a4bb2452e7f93...64d10c13136e1c5bce3e5fbde8d4906eeaafc885)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-03 10:45:04 +02:00
Harald Kuhr 2d6f7d89fa JDK 25 seems to have added Exif thumbnail read support 2025-10-03 10:42:16 +02:00
dependabot[bot] 1afa35ccd6 Bump org.apache.maven.scm:maven-scm-provider-gitexe from 2.1.0 to 2.2.1
Bumps org.apache.maven.scm:maven-scm-provider-gitexe from 2.1.0 to 2.2.1.

---
updated-dependencies:
- dependency-name: org.apache.maven.scm:maven-scm-provider-gitexe
  dependency-version: 2.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:31:59 +02:00
dependabot[bot] 5b184a2a8a Bump junit.jupiter.version from 5.13.4 to 5.14.0
Bumps `junit.jupiter.version` from 5.13.4 to 5.14.0.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:13:48 +02:00
dependabot[bot] 39bd218085 Bump ossf/scorecard-action from 2.4.2 to 2.4.3 in /.github/workflows
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/05b42c624433fc40578a4040d5cf5e36ddca8cde...4eaacf0543bb3f2c246792bd56e8cdeffafb205a)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:12:52 +02:00
dependabot[bot] 87af2f6212 Bump github/codeql-action from 3.30.1 to 3.30.5 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.1 to 3.30.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f1f6e5f6af878fb37288ce1c627459e94dbf7d01...3599b3baa15b485a2e49ef411a7a4bb2452e7f93)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:12:03 +02:00
dependabot[bot] 598ea1e486 Bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.14.0 to 3.14.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:10:20 +02:00
dependabot[bot] 93180e7a2d Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.3 to 3.12.0
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.3 to 3.12.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.3...maven-javadoc-plugin-3.12.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-version: 3.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:10:09 +02:00
dependabot[bot] 2cc6d1d28e Bump org.apache.maven.plugins:maven-shade-plugin from 3.6.0 to 3.6.1
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.6.0...v3.6.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-version: 3.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:09:56 +02:00
dependabot[bot] 8ea9d6f318 Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.3 to 3.5.4
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.3 to 3.5.4.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:09:46 +02:00
dependabot[bot] 029fa843f6 Bump org.apache.maven.plugins:maven-surefire-report-plugin
Bumps [org.apache.maven.plugins:maven-surefire-report-plugin](https://github.com/apache/maven-surefire) from 3.5.3 to 3.5.4.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-report-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 09:09:03 +02:00
Harald Kuhr 2cb4c0a661 Update ci.yml 2025-10-02 09:06:21 +02:00
dependabot[bot] bf40c81123 Bump github/codeql-action from 3.30.0 to 3.30.1 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.0 to 3.30.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d...f1f6e5f6af878fb37288ce1c627459e94dbf7d01)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 11:32:17 +02:00
dependabot[bot] 78a90fab95 Bump github/codeql-action from 3.29.11 to 3.30.0 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.11 to 3.30.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/3c3833e0f8c1c83d449a7478aa59c036a9165498...2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 09:09:05 +02:00
dependabot[bot] b03f7a5582 Bump github/codeql-action from 3.29.10 to 3.29.11 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.10 to 3.29.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/96f518a34f7a870018057716cc4d7a5c014bd61c...3c3833e0f8c1c83d449a7478aa59c036a9165498)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-22 11:08:08 +02:00
dependabot[bot] 96470c3897 Bump actions/setup-java from 4.7.1 to 5.0.0 in /.github/workflows
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.7.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/c5195efecf7bdfc987ee8bae7a71cb8b11521c00...dded0888837ed1f317902acf8a20df0ad188d165)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 16:09:00 +02:00
dependabot[bot] 365b19998f Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.2 to 3.11.3.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.2...maven-javadoc-plugin-3.11.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-version: 3.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20 14:21:09 +02:00
dependabot[bot] b1846e1aed Bump github/codeql-action from 3.29.9 to 3.29.10 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.9 to 3.29.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/df559355d593797519d70b90fc8edd5db049e7a2...96f518a34f7a870018057716cc4d7a5c014bd61c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-20 14:20:24 +02:00
dependabot[bot] ec63fbbd85 Bump github/codeql-action from 3.29.8 to 3.29.9 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.8 to 3.29.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/76621b61decf072c1cee8dd1ce2d2a82d33c17ed...df559355d593797519d70b90fc8edd5db049e7a2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-13 10:57:39 +02:00
dependabot[bot] fbea929bc5 Bump actions/checkout from 4.2.2 to 5.0.0 in /.github/workflows
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/11bd71901bbe5b1630ceea73d27597364c9af683...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 19:22:26 +02:00
dependabot[bot] 18372944f1 Bump github/codeql-action from 3.29.2 to 3.29.8 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/181d5eefc20863364f96762470ba6f862bdef56b...76621b61decf072c1cee8dd1ce2d2a82d33c17ed)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 15:59:16 +02:00
dependabot[bot] 488608b312 Bump junit.jupiter.version from 5.13.3 to 5.13.4
Bumps `junit.jupiter.version` from 5.13.3 to 5.13.4.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 15:58:37 +02:00
dependabot[bot] b3ae8a8ba6 Bump commons-io:commons-io from 2.19.0 to 2.20.0
Bumps [commons-io:commons-io](https://github.com/apache/commons-io) from 2.19.0 to 2.20.0.
- [Changelog](https://github.com/apache/commons-io/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-io/compare/rel/commons-io-2.19.0...rel/commons-io-2.20.0)

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 15:58:09 +02:00
dependabot[bot] fc3455d2c6 Bump mikepenz/action-junit-report in /.github/workflows
---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 5.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-07 12:38:30 +02:00
dependabot[bot] f653279c62 Bump junit.jupiter.version from 5.13.2 to 5.13.3
Bumps `junit.jupiter.version` from 5.13.2 to 5.13.3.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-07 12:38:09 +02:00
dependabot[bot] 0eff483d72 Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.7 to 3.2.8
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.7 to 3.2.8.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.7...maven-gpg-plugin-3.2.8)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-version: 3.2.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-02 10:36:43 +02:00
dependabot[bot] 9c044b132b Bump github/codeql-action from 3.29.1 to 3.29.2 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.1 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/39edc492dbe16b1465b0cafca41432d857bdb31a...181d5eefc20863364f96762470ba6f862bdef56b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 12:50:51 +02:00
dependabot[bot] 1ec4088e49 Bump github/codeql-action from 3.29.0 to 3.29.1 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.29.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/ce28f5bb42b7a9f2c824e633a3f6ee835bab6858...39edc492dbe16b1465b0cafca41432d857bdb31a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 08:27:44 +02:00
dependabot[bot] 5ac415d019 Bump org.apache.maven.plugins:maven-pmd-plugin from 3.26.0 to 3.27.0
Bumps [org.apache.maven.plugins:maven-pmd-plugin](https://github.com/apache/maven-pmd-plugin) from 3.26.0 to 3.27.0.
- [Release notes](https://github.com/apache/maven-pmd-plugin/releases)
- [Commits](https://github.com/apache/maven-pmd-plugin/compare/maven-pmd-plugin-3.26.0...maven-pmd-plugin-3.27.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-pmd-plugin
  dependency-version: 3.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-26 11:00:28 +02:00
dependabot[bot] 133eafc8c2 Bump junit.jupiter.version from 5.13.1 to 5.13.2
Bumps `junit.jupiter.version` from 5.13.1 to 5.13.2.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-25 12:41:59 +02:00
Harald Kuhr 85346a82e1 Fix JavaDoc that breaks build... 2025-06-17 08:30:43 +02:00
Harald Kuhr e718e58b65 #1152 Fix TIFF CCITT T.4/T.6 metadata compression names 2025-06-16 21:18:30 +02:00
dependabot[bot] 13a64ed3bb Bump mikepenz/action-junit-report in /.github/workflows
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 5.6.0 to 5.6.1.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/65fe03598d8d251738592a497a9e8547a5c48eaa...a83fd2b5d58d4fc702e690c1ea688d702d28d281)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 5.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-16 11:38:50 +02:00
dependabot[bot] 3c6df6ad1b Bump github/codeql-action from 3.28.19 to 3.29.0 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.19 to 3.29.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/fca7ace96b7d713c7035871441bd52efbe39e27e...ce28f5bb42b7a9f2c824e633a3f6ee835bab6858)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-12 13:40:43 +02:00
dependabot[bot] 9abe154ed3 Bump junit.jupiter.version from 5.13.0 to 5.13.1
Bumps `junit.jupiter.version` from 5.13.0 to 5.13.1.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 14:49:17 +02:00
Harald Kuhr 0e752a2d2c Bump org.junit.jupiter:junit-jupiter-api from 5.12.2 to 5.13.0 (#1149) 2025-06-06 13:03:03 +02:00
Harald Kuhr 867a46d281 Bump org.junit.jupiter:junit-jupiter-all from 5.12.2 to 5.13.0 (#1147) 2025-06-06 10:32:42 +02:00
77 changed files with 967 additions and 267 deletions
+4
View File
@@ -5,9 +5,13 @@ updates:
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
open-pull-requests-limit: 10
# GitHub actions updates
- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
interval: "daily"
cooldown:
default-days: 7
+40 -24
View File
@@ -17,13 +17,16 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
java: [ 11, 17, 21, 23 ]
java: [ 8, 11, 17, 21, 25 ]
exclude:
- os: macos-latest
java: 8
runs-on: ${{ matrix.os }}
permissions:
checks: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
@@ -32,33 +35,29 @@ jobs:
- name: Run Tests
run: mvn --batch-mode --no-transfer-progress test
- name: Publish Test Report
uses: mikepenz/action-junit-report@65fe03598d8d251738592a497a9e8547a5c48eaa # v5
uses: mikepenz/action-junit-report@74626db7353a25a20a72816467ebf035f674c5f8 # v5
if: ${{ !cancelled() }}
with:
report_paths: "**/target/surefire-reports/TEST*.xml"
check_name: Unit Test Results for OpenJDK ${{ matrix.java }} on ${{ matrix.os }}
test-jdk8:
name: Test OpenJDK ${{ matrix.java }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-13 ]
runs-on: ${{ matrix.os }}
test-jdk8-macos:
name: Test OpenJDK 8 on macos-14
runs-on: macos-14
permissions:
checks: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
distribution: 'zulu'
java-version: '8'
java-package: jdk
cache: 'maven'
- name: Run Tests
run: mvn --batch-mode --no-transfer-progress test
- name: Publish Test Report
uses: mikepenz/action-junit-report@65fe03598d8d251738592a497a9e8547a5c48eaa # v5
uses: mikepenz/action-junit-report@74626db7353a25a20a72816467ebf035f674c5f8 # v5
if: ${{ !cancelled() }}
with:
report_paths: "**/target/surefire-reports/TEST*.xml"
@@ -73,11 +72,11 @@ jobs:
matrix:
kcms: [ true, false ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: |
download_url="https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245038_d3c52aa6bfa54d3ca74e617f18309292"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
@@ -92,26 +91,43 @@ jobs:
- name: Run Tests
run: mvn --batch-mode --no-transfer-progress test
- name: Publish Test Report
uses: mikepenz/action-junit-report@65fe03598d8d251738592a497a9e8547a5c48eaa # v5
uses: mikepenz/action-junit-report@74626db7353a25a20a72816467ebf035f674c5f8 # v5
if: ${{ !cancelled() }}
with:
report_paths: "**/target/surefire-reports/TEST*.xml"
check_name: Unit Test Results for Oracle JDK 8 with KCMS=${{ matrix.kcms }}
javadoc:
name: Build JavaDoc on OpenJDK ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 25 ] # We only need a few versions here
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-package: jdk
cache: 'maven'
- name: Create JavaDoc
run: mvn --batch-mode --no-transfer-progress -DskipTests package javadoc:javadoc
release:
name: Deploy
needs: [ test, test-jdk8, test-oracle ]
needs: [ test, test-jdk8-macos, test-oracle, javadoc ]
if: github.ref == 'refs/heads/master' # only perform on latest master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Maven Central
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '8'
java-package: jdk
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy (1)
server-password: MAVEN_CENTRAL_PASSWORD # env variable for token in deploy (2)
- name: Get Project Version
@@ -121,7 +137,7 @@ jobs:
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') }}
run: mvn --batch-mode --no-transfer-progress deploy -P release -DskipTests -Dgpg.signer=bc
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} # must be the same env variable name as (1)
MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} # must be the same env variable name as (2)
MAVEN_CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} # must be the same env variable name as (1)
MAVEN_CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} # must be the same env variable name as (2)
MAVEN_GPG_KEY: ${{ secrets.GPG_KEY }} # Value of the GPG private key to import
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+4 -4
View File
@@ -33,11 +33,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -64,6 +64,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
with:
category: "/language:${{matrix.language}}"
+4 -4
View File
@@ -26,12 +26,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
@@ -49,7 +49,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: SARIF file
path: results.sarif
@@ -57,6 +57,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
with:
sarif_file: results.sarif
+38 -38
View File
@@ -4,7 +4,7 @@
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7900/badge)](https://www.bestpractices.dev/projects/7900)
[![Maven Central](https://img.shields.io/maven-central/v/com.twelvemonkeys.imageio/imageio?color=slateblue)](https://search.maven.org/search?q=g:com.twelvemonkeys.imageio)
[![Maven Snapshot](https://img.shields.io/nexus/s/com.twelvemonkeys.imageio/imageio?label=development&server=https%3A%2F%2Foss.sonatype.org&color=slateblue)](https://oss.sonatype.org/content/repositories/snapshots/com/twelvemonkeys/)
[![Maven Snapshot](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fcentral.sonatype.com%2Frepository%2Fmaven-snapshots%2Fcom%2Ftwelvemonkeys%2Fimageio%2Fimageio%2Fmaven-metadata.xml&label=development&server=https%3A%2F%2Foss.sonatype.org&color=slateblue)](https://central.sonatype.com/repository/maven-snapshots/com/twelvemonkeys/imageio/imageio/maven-metadata.xml)
[![StackOverflow](https://img.shields.io/badge/stack_overflow-twelvemonkeys-orange.svg)](https://stackoverflow.com/questions/tagged/twelvemonkeys)
[![Donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://paypal.me/haraldk76/100)
@@ -316,12 +316,12 @@ To depend on the JPEG and TIFF plugin using Maven, add the following to your POM
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-jpeg</artifactId>
<version>3.12.0</version>
<version>3.13.1</version>
</dependency>
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-tiff</artifactId>
<version>3.12.0</version>
<version>3.13.1</version>
</dependency>
<!--
@@ -331,7 +331,7 @@ To depend on the JPEG and TIFF plugin using Maven, add the following to your POM
<dependency>
<groupId>com.twelvemonkeys.servlet</groupId>
<artifactId>servlet</artifactId>
<version>3.12.0</version>
<version>3.13.1</version>
</dependency>
<!--
@@ -340,7 +340,7 @@ To depend on the JPEG and TIFF plugin using Maven, add the following to your POM
<dependency>
<groupId>com.twelvemonkeys.servlet</groupId>
<artifactId>servlet</artifactId>
<version>3.12.0</version>
<version>3.13.1</version>
<classifier>jakarta</classifier>
</dependency>
</dependencies>
@@ -350,13 +350,13 @@ To depend on the JPEG and TIFF plugin using Maven, add the following to your POM
To depend on the JPEG and TIFF plugin in your IDE or program, add all of the following JARs to your class path:
twelvemonkeys-common-lang-3.12.0.jar
twelvemonkeys-common-io-3.12.0.jar
twelvemonkeys-common-image-3.12.0.jar
twelvemonkeys-imageio-core-3.12.0.jar
twelvemonkeys-imageio-metadata-3.12.0.jar
twelvemonkeys-imageio-jpeg-3.12.0.jar
twelvemonkeys-imageio-tiff-3.12.0.jar
twelvemonkeys-common-lang-3.13.1.jar
twelvemonkeys-common-io-3.13.1.jar
twelvemonkeys-common-image-3.13.1.jar
twelvemonkeys-imageio-core-3.13.1.jar
twelvemonkeys-imageio-metadata-3.13.1.jar
twelvemonkeys-imageio-jpeg-3.13.1.jar
twelvemonkeys-imageio-tiff-3.13.1.jar
#### Deploying the plugins in a web app
@@ -432,46 +432,46 @@ Other "fat" JAR bundlers will probably have similar mechanisms to merge entries
### Links to prebuilt binaries
##### Latest version (3.12.0)
##### Latest version (3.13.1)
The latest version that will run on Java 7 is 3.9.4. Later versions will require Java 8 or later.
Common dependencies
* [common-lang-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-lang/3.12.0/common-lang-3.12.0.jar)
* [common-io-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-io/3.12.0/common-io-3.12.0.jar)
* [common-image-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-image/3.12.0/common-image-3.12.0.jar)
* [common-lang-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-lang/3.13.1/common-lang-3.13.1.jar)
* [common-io-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-io/3.13.1/common-io-3.13.1.jar)
* [common-image-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-image/3.13.1/common-image-3.13.1.jar)
ImageIO dependencies
* [imageio-core-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-core/3.12.0/imageio-core-3.12.0.jar)
* [imageio-metadata-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-metadata/3.12.0/imageio-metadata-3.12.0.jar)
* [imageio-core-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-core/3.13.1/imageio-core-3.13.1.jar)
* [imageio-metadata-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-metadata/3.13.1/imageio-metadata-3.13.1.jar)
ImageIO plugins
* [imageio-bmp-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-bmp/3.12.0/imageio-bmp-3.12.0.jar)
* [imageio-dds-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-dds/3.12.0/imageio-dds-3.12.0.jar)
* [imageio-hdr-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-hdr/3.12.0/imageio-hdr-3.12.0.jar)
* [imageio-icns-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-icns/3.12.0/imageio-icns-3.12.0.jar)
* [imageio-iff-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-iff/3.12.0/imageio-iff-3.12.0.jar)
* [imageio-jpeg-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-jpeg/3.12.0/imageio-jpeg-3.12.0.jar)
* [imageio-pcx-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pcx/3.12.0/imageio-pcx-3.12.0.jar)
* [imageio-pict-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pict/3.12.0/imageio-pict-3.12.0.jar)
* [imageio-pnm-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pnm/3.12.0/imageio-pnm-3.12.0.jar)
* [imageio-psd-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-psd/3.12.0/imageio-psd-3.12.0.jar)
* [imageio-sgi-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-sgi/3.12.0/imageio-sgi-3.12.0.jar)
* [imageio-tga-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-tga/3.12.0/imageio-tga-3.12.0.jar)
* [imageio-thumbsdb-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-thumbsdb/3.12.0/imageio-thumbsdb-3.12.0.jar)
* [imageio-tiff-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-tiff/3.12.0/imageio-tiff-3.12.0.jar)
* [imageio-webp-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-webp/3.12.0/imageio-webp-3.12.0.jar)
* [imageio-xwd-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-xwd/3.12.0/imageio-xwd-3.12.0.jar)
* [imageio-bmp-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-bmp/3.13.1/imageio-bmp-3.13.1.jar)
* [imageio-dds-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-dds/3.13.1/imageio-dds-3.13.1.jar)
* [imageio-hdr-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-hdr/3.13.1/imageio-hdr-3.13.1.jar)
* [imageio-icns-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-icns/3.13.1/imageio-icns-3.13.1.jar)
* [imageio-iff-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-iff/3.13.1/imageio-iff-3.13.1.jar)
* [imageio-jpeg-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-jpeg/3.13.1/imageio-jpeg-3.13.1.jar)
* [imageio-pcx-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pcx/3.13.1/imageio-pcx-3.13.1.jar)
* [imageio-pict-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pict/3.13.1/imageio-pict-3.13.1.jar)
* [imageio-pnm-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pnm/3.13.1/imageio-pnm-3.13.1.jar)
* [imageio-psd-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-psd/3.13.1/imageio-psd-3.13.1.jar)
* [imageio-sgi-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-sgi/3.13.1/imageio-sgi-3.13.1.jar)
* [imageio-tga-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-tga/3.13.1/imageio-tga-3.13.1.jar)
* [imageio-thumbsdb-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-thumbsdb/3.13.1/imageio-thumbsdb-3.13.1.jar)
* [imageio-tiff-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-tiff/3.13.1/imageio-tiff-3.13.1.jar)
* [imageio-webp-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-webp/3.13.1/imageio-webp-3.13.1.jar)
* [imageio-xwd-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-xwd/3.13.1/imageio-xwd-3.13.1.jar)
ImageIO plugins requiring 3rd party libs
* [imageio-batik-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-batik/3.12.0/imageio-batik-3.12.0.jar)
* [imageio-batik-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-batik/3.13.1/imageio-batik-3.13.1.jar)
Photoshop Path support for ImageIO
* [imageio-clippath-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-clippath/3.12.0/imageio-clippath-3.12.0.jar)
* [imageio-clippath-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-clippath/3.13.1/imageio-clippath-3.13.1.jar)
Servlet support
* [servlet-3.12.0.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/servlet/servlet/3.12.0/servlet-3.12.0.jar) for legacy Java EE (javax.servlet)
* [servlet-3.12.0-jakarta.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/servlet/servlet/3.12.0/servlet-3.12.0-jakrta.jar) for Jakarta EE (jakarta.servlet)
* [servlet-3.13.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/servlet/servlet/3.13.1/servlet-3.13.1.jar) for legacy Java EE (javax.servlet)
* [servlet-3.13.1-jakarta.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/servlet/servlet/3.13.1/servlet-3.13.1-jakrta.jar) for Jakarta EE (jakarta.servlet)
## License
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>com.twelvemonkeys</groupId>
<artifactId>twelvemonkeys</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<groupId>com.twelvemonkeys.bom</groupId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.common</groupId>
<artifactId>common</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>common-image</artifactId>
<packaging>jar</packaging>
@@ -47,10 +47,10 @@ import java.util.Random;
* |3|5|1|
* - - -->
* </p>
* <table border="1" cellpadding="4" cellspacing="0">
* <table border="1">
* <caption>Floyd-Steinberg error-diffusion weights</caption>
* <tr><td bgcolor="#000000">&nbsp;</td><td class="TableHeadingColor"
* align="center">x</td><td>7/16</td></tr>
* <tr><td style="background:#000000">&nbsp;</td><td class="TableHeadingColor"
* style="text-align:center">x</td><td>7/16</td></tr>
* <tr><td>3/16</td><td>5/16</td><td>1/16</td></tr>
* </table>
* <p>
@@ -162,7 +162,7 @@ public final class ImageUtil {
/**
* The sharpen kernel. Uses the following 3 by 3 matrix:
* <table border="1" cellspacing="0">
* <table border="1">
* <caption>Sharpen Kernel Matrix</caption>
* <tr><td>0.0</td><td>-0.3</td><td>0.0</td></tr>
* <tr><td>-0.3</td><td>2.2</td><td>-0.3</td></tr>
@@ -1078,7 +1078,7 @@ public final class ImageUtil {
/**
* Sharpens an image using a convolution matrix.
* The sharpen kernel used, is defined by the following 3 by 3 matrix:
* <table border="1" cellspacing="0">
* <table border="1">
* <caption>Sharpen Kernel Matrix</caption>
* <tr><td>0.0</td><td>-0.3</td><td>0.0</td></tr>
* <tr><td>-0.3</td><td>2.2</td><td>-0.3</td></tr>
@@ -1100,7 +1100,7 @@ public final class ImageUtil {
/**
* Sharpens an image using a convolution matrix.
* The sharpen kernel used, is defined by the following 3 by 3 matrix:
* <table border="1" cellspacing="0">
* <table border="1">
* <caption>Sharpen Kernel Matrix</caption>
* <tr><td>0.0</td><td>-{@code pAmount}</td><td>0.0</td></tr>
* <tr><td>-{@code pAmount}</td>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.common</groupId>
<artifactId>common</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>common-io</artifactId>
<packaging>jar</packaging>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.common</groupId>
<artifactId>common</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>common-lang</artifactId>
<packaging>jar</packaging>
@@ -1765,12 +1765,11 @@ public final class StringUtil {
* expression.
* <p>
* An invocation of this method of the form
* <tt>matches(<i>str</i>, <i>regex</i>)</tt> yields exactly the
* {@code matches(str, regex)} yields exactly the
* same result as the expression
* </p>
* <blockquote><tt> {@link Pattern}.
* {@link Pattern#matches(String, CharSequence) matches}
* (<i>regex</i>, <i>str</i>)</tt></blockquote>
* <blockquote>{@link Pattern}.
* {@link Pattern#matches(String, CharSequence) matches(regex, str)}</blockquote>
*
* @param pString the string
* @param pRegex the regular expression to which this string is to be matched
@@ -1789,16 +1788,14 @@ public final class StringUtil {
* regular expression with the given pReplacement.
* <p>
* An invocation of this method of the form
* <tt>
* replaceFirst(<i>str</i>, <i>regex</i>, <i>repl</i>)
* </tt>
* {@code replaceFirst(str, regex, repl)}
* yields exactly the same result as the expression:
* </p>
* <blockquote><tt>
* {@link Pattern}.{@link Pattern#compile(String) compile}(<i>regex</i>).
* {@link Pattern#matcher matcher}(<i>str</i>).
* {@link java.util.regex.Matcher#replaceFirst replaceFirst}(<i>repl</i>)
* </tt></blockquote>
* <blockquote>
* {@link Pattern#compile(String) Pattern.compile(regex)}
* {@link Pattern#matcher .matcher(str)}
* {@link java.util.regex.Matcher#replaceFirst .replaceFirst(repl)}
* </blockquote>
*
* @param pString the string
* @param pRegex the regular expression to which this string is to be matched
@@ -1817,14 +1814,14 @@ public final class StringUtil {
* regular expression with the given pReplacement.
* <p>
* An invocation of this method of the form
* <tt>replaceAll(<i>str</i>, <i>pRegex</i>, <i>repl</i>)</tt>
* {@code replaceAll(str, pRegex, repl)}
* yields exactly the same result as the expression
* </p>
* <blockquote><tt>
* {@link Pattern}.{@link Pattern#compile(String) compile}(<i>pRegex</i>).
* {@link Pattern#matcher matcher}(<i>str</i>{@code ).
* {@link java.util.regex.Matcher#replaceAll replaceAll}(}<i>repl</i>{@code )}
* </tt></blockquote>
* <blockquote>
* {@link Pattern#compile(String) Pattern.compile(pRegex)}
* {@link Pattern#matcher .matcher(str)}
* {@link java.util.regex.Matcher#replaceAll .replaceAll(repl)}
* </blockquote>
*
* @param pString the string
* @param pRegex the regular expression to which this string is to be matched
@@ -1862,12 +1859,12 @@ public final class StringUtil {
* </p>
* <p>
* An invocation of this method of the form
* <tt>split(<i>str</i>, <i>regex</i>, <i>n</i>)</tt>
* {@code split(str, regex, n)}
* yields the same result as the expression:
* </p>
* <blockquote>{@link Pattern}.
* {@link Pattern#compile(String) compile}<tt>(<i>regex</i>).
* {@link Pattern#split(CharSequence,int) split}(<i>str</i>, <i>n</i>)</tt>
* {@link Pattern#compile(String) compile(regex)}.
* {@link Pattern#split(CharSequence,int) split(str, n)}
* </blockquote>
*
* @param pString the string
+8 -3
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys</groupId>
<artifactId>twelvemonkeys</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<groupId>com.twelvemonkeys.common</groupId>
<artifactId>common</artifactId>
@@ -20,6 +20,10 @@
<module>common-image</module>
</modules>
<properties>
<junit.jupiter.version>5.14.2</junit.jupiter.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
@@ -43,17 +47,18 @@
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
+8 -3
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys</groupId>
<artifactId>twelvemonkeys</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<groupId>com.twelvemonkeys.contrib</groupId>
<artifactId>contrib</artifactId>
@@ -13,6 +13,11 @@
Contributions to TwelveMonkeys and code that doesn't fit anywhere else.
</description>
<properties>
<junit.jupiter.version>5.14.2</junit.jupiter.version>
</properties>
<dependencies>
<dependency>
<groupId>com.twelvemonkeys.common</groupId>
@@ -64,13 +69,13 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-batik</artifactId>
<name>TwelveMonkeys :: ImageIO :: Batik Plugin</name>
@@ -63,7 +63,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.19.0</version>
<version>2.21.0</version>
<scope>provided</scope>
</dependency>
@@ -36,9 +36,11 @@ import com.twelvemonkeys.lang.SystemUtil;
import javax.imageio.ImageReader;
import javax.imageio.spi.ServiceRegistry;
import javax.imageio.stream.ImageInputStream;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
import java.io.IOException;
import java.util.Locale;
import java.util.function.Predicate;
import static com.twelvemonkeys.imageio.util.IIOUtil.deregisterProvider;
@@ -134,10 +136,42 @@ public final class SVGImageReaderSpi extends ImageReaderSpiBase {
if (buffer[0] == 's' && buffer[1] == 'v' && buffer[2] == 'g'
&& (Character.isWhitespace((char) buffer[3]) || buffer[3] == ':')) {
// It's SVG, identified by root tag
// TODO: Support svg with prefix + recognize namespace (http://www.w3.org/2000/svg)!
return true;
}
// Read the full tag name (may contain a prefix of any length)
final int MAX_TAG_NAME = 256;
ByteArrayOutputStream nameBuf = new ByteArrayOutputStream(MAX_TAG_NAME);
// We already have 4 bytes in 'buffer' (from input.readFully(buffer))
int consumedFromBuffer = 0;
for (; consumedFromBuffer < buffer.length; consumedFromBuffer++) {
byte bb = buffer[consumedFromBuffer];
if (bb == '>' || Character.isWhitespace((char) bb) || bb == '/') {
break;
}
nameBuf.write(bb);
}
// If tag name not terminated yet, keep reading bytes (within limit)
final boolean incompleteTagName = consumedFromBuffer == buffer.length;
readBuffer(input, nameBuf, output -> incompleteTagName && output.size() < MAX_TAG_NAME,
bb -> bb == '>' || Character.isWhitespace(bb) || bb == '/');
final String name = nameBuf.toString("US-ASCII");
if (name.toLowerCase(Locale.ENGLISH).endsWith(":svg")) {
// Scan the rest of the tag attributes until '>' to find the SVG namespace URI
ByteArrayOutputStream attrBuf = new ByteArrayOutputStream();
final int MAX_ATTR_SCAN = 1024; // safe upper bound to keep it fast
readBuffer(input, attrBuf, output -> output.size() < MAX_ATTR_SCAN, bb -> bb == '>');
// If the tag contains the SVG namespace, it's SVG.
if (attrBuf.toString("US-ASCII").matches(
".*xmlns:" + name.split(":")[0] + "\\s*=\\s*\"http://www.w3.org/2000/svg\".*")) {
return true;
}
}
// If the tag is not "svg", this isn't SVG
return false;
}
@@ -157,6 +191,17 @@ public final class SVGImageReaderSpi extends ImageReaderSpiBase {
}
}
private static void readBuffer(final ImageInputStream input, final ByteArrayOutputStream buffer,
final Predicate<ByteArrayOutputStream> loopCondition, Predicate<Byte> breakCondition) throws IOException {
while (loopCondition.test(buffer)) {
byte bb = input.readByte();
if (breakCondition.test(bb)) {
break;
}
buffer.write(bb);
}
}
public ImageReader createReaderInstance(final Object extension) throws IOException {
return new SVGImageReader(this);
}
@@ -56,7 +56,7 @@ public class SVGImageReaderSpiTest {
"/svg/Android_robot.svg", // Minimal, no xml dec, no namespace
"/svg/batikLogo.svg", // xml dec, comments, namespace
"/svg/blue-square.svg", // xml dec, namespace
"/svg/red-square.svg",
"/svg/red-square.svg", // prefixed namespace
};
private static final String[] INVALID_INPUTS = {
@@ -70,6 +70,9 @@ public class SVGImageReaderSpiTest {
"<!-- ", // #275 Infinite loop issue
"<?123?>", // #275 Infinite loop issue
"<svg",
"<ns0:svg>", // namespace prefix undefined
"<ns0:svg xmlns:ns0=\"foo\">", // not the official svg namespace
"<ns0:svg xmlns:ns1=\"http://www.w3.org/2000/svg\">", // mismatching prefix
};
static {
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" id="red-square" version="1.1">
<g id="layer1">
<rect id="rect2985" width="100" height="100" x="0" y="0"
<ns0:svg xmlns:ns0="http://www.w3.org/2000/svg" width="100" height="100" id="red-square" version="1.1">
<ns0:g id="layer1">
<ns0:rect id="rect2985" width="100" height="100" x="0" y="0"
style="color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>
</ns0:g>
</ns0:svg>

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 465 B

+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-bmp</artifactId>
<name>TwelveMonkeys :: ImageIO :: BMP plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-clippath</artifactId>
<name>TwelveMonkeys :: ImageIO :: Photoshop Path Support</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-core</artifactId>
<name>TwelveMonkeys :: ImageIO :: Core</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-dds</artifactId>
<name>TwelveMonkeys :: ImageIO :: DDS plugin</name>
@@ -32,7 +32,7 @@ package com.twelvemonkeys.imageio.plugins.dds;
@SuppressWarnings("unused")
interface DDS {
byte[] MAGIC = new byte[]{'D', 'D', 'S', ' '};
int MAGIC = ('D' << 24) + ('D' << 16) + ('S' << 8) + ' '; //Big-Endian
int HEADER_SIZE = 124;
// Header Flags
@@ -48,4 +48,7 @@ interface DDS {
// Pixel Format Flags
int PIXEL_FORMAT_FLAG_FOURCC = 0x04;
int PIXEL_FORMAT_FLAG_RGB = 0x40;
//DX10 Resource Dimensions
int D3D10_RESOURCE_DIMENSION_TEXTURE2D = 3;
}
@@ -34,8 +34,7 @@ import javax.imageio.IIOException;
import javax.imageio.stream.ImageInputStream;
import java.awt.Dimension;
import java.io.IOException;
import java.math.BigInteger;
import java.util.Arrays;
import java.nio.ByteOrder;
final class DDSHeader {
@@ -58,11 +57,12 @@ final class DDSHeader {
DDSHeader header = new DDSHeader();
// Read MAGIC bytes [0,3]
byte[] magic = new byte[DDS.MAGIC.length];
imageInput.readFully(magic);
if (!Arrays.equals(DDS.MAGIC, magic)) {
throw new IIOException(String.format("Not a DDS file. Expected DDS magic 0x%08x', read 0x%08x", new BigInteger(DDS.MAGIC), new BigInteger(magic)));
imageInput.setByteOrder(ByteOrder.BIG_ENDIAN);
int magic = imageInput.readInt();
if (magic != DDS.MAGIC) {
throw new IIOException(String.format("Not a DDS file. Expected DDS magic 0x%8x', read 0x%8x", DDS.MAGIC, magic));
}
imageInput.setByteOrder(ByteOrder.LITTLE_ENDIAN);
// DDS_HEADER structure
// https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-header
@@ -93,8 +93,7 @@ final class DDSHeader {
// build dimensions list
header.addDimensions(dwWidth, dwHeight);
byte[] dwReserved1 = new byte[11 * 4]; // [32,75]
imageInput.readFully(dwReserved1);
imageInput.skipBytes(44);
// DDS_PIXELFORMAT structure
int px_dwSize = imageInput.readInt(); // [76,79]
@@ -35,7 +35,6 @@ import com.twelvemonkeys.imageio.spi.ImageReaderSpiBase;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Locale;
public final class DDSImageReaderSpi extends ImageReaderSpiBase {
@@ -55,10 +54,7 @@ public final class DDSImageReaderSpi extends ImageReaderSpiBase {
stream.mark();
try {
byte[] magic = new byte[DDS.MAGIC.length];
stream.readFully(magic);
return Arrays.equals(DDS.MAGIC, magic);
return stream.readInt() == DDS.MAGIC;
} finally {
stream.reset();
}
@@ -74,15 +74,19 @@ final class DDSReader {
static final Order ARGB_ORDER = new Order(16, 8, 0, 24);
private final DDSHeader header;
private DX10Header dxt10Header;
DDSReader(DDSHeader header) {
this.header = header;
}
int[] read(ImageInputStream imageInput, int imageIndex) throws IOException {
// type
DDSType type = getType();
if (type == DDSType.DXT10) {
dxt10Header = DX10Header.read(imageInput);
type = dxt10Header.getDDSType();
}
// offset buffer to index mipmap image
byte[] buffer = null;
@@ -138,7 +142,6 @@ final class DDSReader {
// DXT
int type = header.getFourCC();
return DDSType.valueOf(type);
} else if ((flags & DDS.PIXEL_FORMAT_FLAG_RGB) != 0) {
// RGB
int bitCount = header.getBitCount();
@@ -224,6 +227,7 @@ final class DDSReader {
}
}
private static int[] decodeDXT1(int width, int height, byte[] buffer) {
int[] pixels = new int[width * height];
int index = 0;
@@ -241,7 +245,7 @@ final class DDSReader {
int t1 = (buffer[index] & 0x0C) >> 2;
int t2 = (buffer[index] & 0x30) >> 4;
int t3 = (buffer[index++] & 0xC0) >> 6;
pixels[4 * width * i + 4 * j + width * k ] = getDXTColor(c0, c1, 0xFF, t0);
pixels[4 * width * i + 4 * j + width * k] = getDXTColor(c0, c1, 0xFF, t0);
if (4 * j + 1 >= width) continue;
pixels[4 * width * i + 4 * j + width * k + 1] = getDXTColor(c0, c1, 0xFF, t1);
if (4 * j + 2 >= width) continue;
@@ -286,7 +290,7 @@ final class DDSReader {
int t1 = (buffer[index] & 0x0C) >> 2;
int t2 = (buffer[index] & 0x30) >> 4;
int t3 = (buffer[index++] & 0xC0) >> 6;
pixels[4 * width * i + 4 * j + width * k ] = getDXTColor(c0, c1, alphaTable[4 * k ], t0);
pixels[4 * width * i + 4 * j + width * k] = getDXTColor(c0, c1, alphaTable[4 * k], t0);
if (4 * j + 1 >= width) continue;
pixels[4 * width * i + 4 * j + width * k + 1] = getDXTColor(c0, c1, alphaTable[4 * k + 1], t1);
if (4 * j + 2 >= width) continue;
@@ -344,7 +348,7 @@ final class DDSReader {
int t1 = (buffer[index] & 0x0C) >> 2;
int t2 = (buffer[index] & 0x30) >> 4;
int t3 = (buffer[index++] & 0xC0) >> 6;
pixels[4 * width * i + 4 * j + width * k ] = getDXTColor(c0, c1, getDXT5Alpha(a0, a1, alphaTable[4 * k ]), t0);
pixels[4 * width * i + 4 * j + width * k] = getDXTColor(c0, c1, getDXT5Alpha(a0, a1, alphaTable[4 * k]), t0);
if (4 * j + 1 >= width) continue;
pixels[4 * width * i + 4 * j + width * k + 1] = getDXTColor(c0, c1, getDXT5Alpha(a0, a1, alphaTable[4 * k + 1]), t1);
if (4 * j + 2 >= width) continue;
@@ -31,12 +31,12 @@
package com.twelvemonkeys.imageio.plugins.dds;
enum DDSType {
DXT1(0x31545844),
DXT2(0x32545844),
DXT3(0x33545844),
DXT4(0x34545844),
DXT5(0x35545844),
DXT10(0x30315844),
A1R5G5B5((1 << 16) | 2),
X1R5G5B5((2 << 16) | 2),
A4R4G4B4((3 << 16) | 2),
@@ -0,0 +1,50 @@
package com.twelvemonkeys.imageio.plugins.dds;
import java.util.Arrays;
import java.util.function.IntPredicate;
/**
* Enum that lists a certain types of DXGI Format this reader supports to read.
*
* <a href="https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format">DXGI Format List</a>
*/
public enum DX10DXGIFormat {
BC1(DDSType.DXT1, rangeInclusive(70, 72)),
BC2(DDSType.DXT2, rangeInclusive(73, 75)),
BC3(DDSType.DXT5, rangeInclusive(76, 78)),
//BC7(99),
B8G8R8A8(DDSType.A8B8G8R8, exactly(87, 90, 91)),
B8G8R8X8(DDSType.X8B8G8R8, exactly(88, 92, 93)),
R8G8B8A8(DDSType.A8R8G8B8, rangeInclusive(27, 32));
private final DDSType ddsType;
private final IntPredicate dxgiFormat;
DX10DXGIFormat(DDSType ddsType, IntPredicate dxgiFormat) {
this.ddsType = ddsType;
this.dxgiFormat = dxgiFormat;
}
DDSType getCorrespondingType() {
return ddsType;
}
static DX10DXGIFormat getFormat(int value) {
for (DX10DXGIFormat format : values()) {
if (format.dxgiFormat.test(value)) return format;
}
throw new IllegalArgumentException("Unsupported DXGI_FORMAT : " + value);
}
/**
* @param acceptedValues values in DXGI Formats List, passed values are expected to be in ascending order
*/
private static IntPredicate exactly(int ... acceptedValues) {
return test -> Arrays.binarySearch(acceptedValues, test) >= 0;
}
private static IntPredicate rangeInclusive(int from, int to) {
return test -> from <= test && test <= to;
}
}
@@ -0,0 +1,33 @@
package com.twelvemonkeys.imageio.plugins.dds;
import javax.imageio.stream.ImageInputStream;
import java.io.IOException;
//https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-header-dxt10
public final class DX10Header {
final DX10DXGIFormat dxgiFormat;
final int resourceDimension, miscFlag, arraySize, miscFlags2;
private DX10Header(int dxgiFormat, int resourceDimension, int miscFlag, int arraySize, int miscFlags2) {
this.dxgiFormat = DX10DXGIFormat.getFormat(dxgiFormat);
this.resourceDimension = resourceDimension;
if (this.resourceDimension != DDS.D3D10_RESOURCE_DIMENSION_TEXTURE2D)
throw new IllegalArgumentException("Resource dimension " + resourceDimension + " is not supported, expected 3.");
this.miscFlag = miscFlag;
this.arraySize = arraySize;
this.miscFlags2 = miscFlags2;
}
static DX10Header read(ImageInputStream inputStream) throws IOException {
int dxgiFormat = inputStream.readInt();
int resourceDimension = inputStream.readInt();
int miscFlag = inputStream.readInt();
int arraySize = inputStream.readInt();
int miscFlags2 = inputStream.readInt();
return new DX10Header(dxgiFormat, resourceDimension, miscFlag, arraySize, miscFlags2);
}
DDSType getDDSType() {
return dxgiFormat.getCorrespondingType();
}
}
@@ -86,7 +86,13 @@ public class DDSImageReaderTest extends ImageReaderAbstractTest<DDSImageReader>
new TestData(getClassLoaderResource("/dds/dds_X8B8G8R8.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dds_X8B8G8R8_mipmap.dds"), dim256, dim128, dim64),
new TestData(getClassLoaderResource("/dds/dds_X8R8G8B8.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dds_X8R8G8B8_mipmap.dds"), dim256, dim128, dim64)
new TestData(getClassLoaderResource("/dds/dds_X8R8G8B8_mipmap.dds"), dim256, dim128, dim64),
new TestData(getClassLoaderResource("/dds/dxt10_BC1_sRGB.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dxt10_BC2_sRGB.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dxt10_BC3_sRGB.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dxt10_B8G8R8A8.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dxt10_B8G8R8X8.dds"), dim256),
new TestData(getClassLoaderResource("/dds/dxt10_R8G8B8A8.dds"), dim256)
);
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-hdr</artifactId>
<name>TwelveMonkeys :: ImageIO :: HDR plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-icns</artifactId>
<name>TwelveMonkeys :: ImageIO :: ICNS plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-iff</artifactId>
<name>TwelveMonkeys :: ImageIO :: IFF plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-jpeg-jai-interop</artifactId>
<name>TwelveMonkeys :: ImageIO :: JPEG/JAI TIFF Interop</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-jpeg-jep262-interop</artifactId>
<name>TwelveMonkeys :: ImageIO :: JPEG/JEP-262 Interop</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-jpeg</artifactId>
<name>TwelveMonkeys :: ImageIO :: JPEG plugin</name>
@@ -212,7 +212,9 @@ final class JPEGLosslessDecoder {
final int[] firstValue = new int[numComp];
for (int i = 0; i < numComp; i++) {
firstValue[i] = (1 << (precision - 1));
// scan.approxLow is the point transformation (Pt) value
// ref. ISO/IEC 10918-1 H.1.2.1
firstValue[i] = (1 << (precision - scan.approxLow - 1));
}
final int[] pred = new int[numComp];
@@ -232,6 +234,11 @@ final class JPEGLosslessDecoder {
output(pred);
current = decode(pred, temp, index);
}
if ((current == JPEG.EOI) && (xLoc == xDim - 1) && (yLoc == yDim - 1)) {
// Output value left in pred if EOI is hit while decoding last pixel
output(pred);
}
break; //current=MARKER
}
@@ -268,6 +275,17 @@ final class JPEGLosslessDecoder {
// TODO oe: 05.05.2018 Is it correct loop? Content of outputData from previous iteration is always lost.
} while ((current != JPEG.EOI) && ((xLoc < xDim) && (yLoc < yDim)) && (scanNum == 0));
// Apply point transform to output. This must be done after it has finished being
// used for predictive purposes.
if (scan.approxLow != 0) {
for (int componentIndex = 0; componentIndex < numComp; ++componentIndex) {
int[] comp = outputData[componentIndex];
for (int i = 0; i < comp.length; i++) {
comp[i] = mask & (comp[i] << scan.approxLow);
}
}
}
return outputData;
}
@@ -329,9 +347,11 @@ final class JPEGLosslessDecoder {
private int decodeSingle(final int[] prev, final int[] temp, final int[] index) throws IOException {
// At the beginning of the first line and
// at the beginning of each restart interval the prediction value of 2P – 1 is used, where P is the input precision.
// If the point transformation parameter (see A.4) is non-zero, the prediction value at the beginning of the first lines and the
// beginning of each restart interval is 2P – Pt – 1 , where Pt is the value of the point transformation parameter
if (restarting) {
restarting = false;
prev[0] = (1 << (frame.samplePrecision - 1));
prev[0] = (1 << (frame.samplePrecision - scan.approxLow - 1));
}
else {
final int[] outputData = this.outputData[0];
@@ -686,7 +706,7 @@ final class JPEGLosslessDecoder {
return getPreviousY(data);
}
else {
return (1 << (frame.samplePrecision - 1));
return (1 << (frame.samplePrecision - scan.approxLow - 1));
}
}
@@ -2033,4 +2033,65 @@ public class JPEGImageReaderTest extends ImageReaderAbstractTest<JPEGImageReader
}
});
}
@Test
public void testReadLosslessJPEGGradient() throws IOException {
JPEGImageReader reader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/jpeg-lossless/gradient_ls.jpg"))) {
reader.setInput(stream);
assertEquals(256, reader.getWidth(0));
assertEquals(256, reader.getHeight(0));
BufferedImage image = reader.read(0, null);
assertNotNull(image);
assertEquals(256, image.getWidth());
assertEquals(256, image.getHeight());
assertEquals(16, image.getColorModel().getComponentSize(0));
for (int y = 0; y < 256; y++) {
for (int x = 0; x < 256; x++) {
assertEquals((y << 8) | x, image.getRaster().getSample(x, y, 0));
}
}
}
finally {
reader.dispose();
}
}
@Test
public void testReadLosslessJPEGGradientWithPointTransform() throws IOException {
JPEGImageReader reader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/jpeg-lossless/gradient_ls_pt.jpg"))) {
reader.setInput(stream);
assertEquals(256, reader.getWidth(0));
assertEquals(256, reader.getHeight(0));
BufferedImage image = reader.read(0, null);
assertNotNull(image);
assertEquals(256, image.getWidth());
assertEquals(256, image.getHeight());
assertEquals(16, image.getColorModel().getComponentSize(0));
for (int y = 0; y < 256; y++) {
for (int x = 0; x < 256; x++) {
int expected = (y << 8) | x;
// Simulate effect of precision loss due to point transform = 4
expected = (expected >> 4) << 4;
assertEquals(expected, image.getRaster().getSample(x, y, 0));
}
}
}
finally {
reader.dispose();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>imageio-metadata</artifactId>
@@ -41,7 +41,11 @@ import javax.imageio.stream.ImageOutputStream;
import java.io.IOException;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import static com.twelvemonkeys.imageio.metadata.tiff.TIFFEntry.getType;
import static com.twelvemonkeys.imageio.metadata.tiff.TIFFEntry.getValueLength;
@@ -176,7 +180,7 @@ public final class TIFFWriter extends MetadataWriter {
stream.seek(dataOffset);
Directory subIFD = (Directory) value;
writeIFD(subIFD, stream, true);
dataOffset += computeDataSize(subIFD);
dataOffset += computeDataSize(subIFD) + directoryCountLength + subIFD.size() * entryLength;
stream.seek(streamPosition);
}
else {
@@ -30,14 +30,23 @@
package com.twelvemonkeys.imageio.metadata.tiff;
import com.twelvemonkeys.imageio.metadata.*;
import com.twelvemonkeys.imageio.metadata.AbstractDirectory;
import com.twelvemonkeys.imageio.metadata.AbstractEntry;
import com.twelvemonkeys.imageio.metadata.CompoundDirectory;
import com.twelvemonkeys.imageio.metadata.Directory;
import com.twelvemonkeys.imageio.metadata.Entry;
import com.twelvemonkeys.imageio.metadata.MetadataWriterAbstractTest;
import com.twelvemonkeys.imageio.metadata.exif.EXIF;
import com.twelvemonkeys.imageio.stream.ByteArrayImageInputStream;
import com.twelvemonkeys.io.FastByteArrayOutputStream;
import org.junit.jupiter.api.Test;
import javax.imageio.ImageIO;
import javax.imageio.stream.ImageInputStream;
import javax.imageio.stream.ImageOutputStream;
import javax.imageio.stream.ImageOutputStreamImpl;
import javax.imageio.stream.MemoryCacheImageOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -46,8 +55,10 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* TIFFWriterTest
@@ -272,7 +283,7 @@ public class TIFFWriterTest extends MetadataWriterAbstractTest {
Directory read = new TIFFReader().read(new ByteArrayImageInputStream(data));
assertNotNull(read.getEntryById(TIFF.TAG_SOFTWARE));
assertTrue(read.getEntryById(TIFF.TAG_SOFTWARE).getValue() instanceof String[], "value not an string array");
assertInstanceOf(String[].class, read.getEntryById(TIFF.TAG_SOFTWARE).getValue(), "value not an string array");
assertArrayEquals(strings, (String[]) read.getEntryById(TIFF.TAG_SOFTWARE).getValue());
}
@@ -285,7 +296,7 @@ public class TIFFWriterTest extends MetadataWriterAbstractTest {
TIFFEntry subSubIFD = new TIFFEntry(TIFF.TAG_SUB_IFD, TIFF.TYPE_LONG, new IFD(Collections.singletonList(subSubSubIFD)));
TIFFEntry subIFD = new TIFFEntry(TIFF.TAG_SUB_IFD, TIFF.TYPE_LONG, new IFD(Collections.singletonList(subSubIFD)));
List<Entry> entries = Collections.<Entry>singletonList(subIFD);
List<Entry> entries = Collections.singletonList(subIFD);
TIFFWriter writer = createWriter();
@@ -296,24 +307,67 @@ public class TIFFWriterTest extends MetadataWriterAbstractTest {
assertEquals(96, stream.getStreamPosition()); // 96 = 4 + 5 * (2 + 12) + 22
}
private static class NullImageOutputStream extends ImageOutputStreamImpl {
@Test
void testWriteNestedExifIFD() throws IOException {
String expectedUserComment = "This ia the expected user comment";
String expectedDateTime = "2026:01:01 00:00:01";
List<Entry> entries = new ArrayList<>();
List<Entry> subDirectoryEntries = new ArrayList<>();
subDirectoryEntries.add(new TIFFEntry(EXIF.TAG_USER_COMMENT, TIFF.TYPE_ASCII, expectedUserComment));
entries.add(new TIFFEntry(TIFF.TAG_DATE_TIME, expectedDateTime));
entries.add(new TIFFEntry(TIFF.TAG_EXIF_IFD, TIFF.TYPE_IFD, new IFD(subDirectoryEntries)));
// NOTE! For the test, it is important that this tag is > Exif IFD and inside IDF0 (even if this is an Exif tag)
entries.add(new TIFFEntry(EXIF.TAG_DATE_TIME_ORIGINAL, TIFF.TYPE_ASCII, expectedDateTime));
IFD expectedSub = new IFD(subDirectoryEntries);
IFD expected = new IFD(entries);
try (ByteArrayOutputStream bytes = new ByteArrayOutputStream()) {
// Write the TIFF w/Exif sub IFD
try (ImageOutputStream stream = new MemoryCacheImageOutputStream(bytes)) {
new TIFFWriter().write(expected, stream);
}
try (ImageInputStream stream = new ByteArrayImageInputStream(bytes.toByteArray())) {
// Read the TIFF back, and compare content
Directory directory = new TIFFReader().read(stream);
Entry dateTimeEntry = directory.getEntryById(EXIF.TAG_DATE_TIME_ORIGINAL);
assertNotNull(dateTimeEntry);
assertEquals(expectedDateTime, dateTimeEntry.getValue());
Entry exifEntry = directory.getEntryById(TIFF.TAG_EXIF_IFD);
IFD exifIFD = (IFD) exifEntry.getValue();
Entry userCommentEntry = exifIFD.getEntryById(EXIF.TAG_USER_COMMENT);
assertNotNull(userCommentEntry);
assertEquals(expectedUserComment, userCommentEntry.getValue());
assertEquals(expectedSub, exifIFD);
assertEquals(expected, ((CompoundDirectory) directory).getDirectory(0));
}
}
}
private static final class NullImageOutputStream extends ImageOutputStreamImpl {
@Override
public void write(int b) throws IOException {
public void write(int b) {
streamPos++;
}
@Override
public void write(byte[] b, int off, int len) throws IOException {
public void write(byte[] b, int off, int len) {
streamPos += len;
}
@Override
public int read() throws IOException {
public int read() {
throw new UnsupportedOperationException("Method read not implemented");
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
public int read(byte[] b, int off, int len) {
throw new UnsupportedOperationException("Method read not implemented");
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-pcx</artifactId>
<name>TwelveMonkeys :: ImageIO :: PCX plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-pdf</artifactId>
<name>TwelveMonkeys :: ImageIO :: PDF plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-pict</artifactId>
<name>TwelveMonkeys :: ImageIO :: PICT plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-pnm</artifactId>
<name>TwelveMonkeys :: ImageIO :: PNM plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-psd</artifactId>
<name>TwelveMonkeys :: ImageIO :: PSD plugin</name>
@@ -410,9 +410,9 @@ public final class PSDMetadata extends AbstractMetadata {
if ((psdLayerInfo.blendMode.flags & 0x01) != 0) {
node.setAttribute("transparencyProtected", "true");
}
if ((psdLayerInfo.blendMode.flags & 0x02) != 0) {
node.setAttribute("visible", "true");
}
// Include always, to avoid ambiguity, as the flag is really "hidden", not "visible"...
boolean hidden = (psdLayerInfo.blendMode.flags & 0x02) != 0;
node.setAttribute("visible", hidden ? "false" : "true");
if ((psdLayerInfo.blendMode.flags & 0x04) != 0) {
node.setAttribute("obsolete", "true");
}
@@ -0,0 +1,119 @@
package com.twelvemonkeys.imageio.plugins.psd;
import static org.junit.jupiter.api.Assertions.*;
import java.io.IOException;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.metadata.IIOMetadataNode;
import javax.imageio.spi.IIORegistry;
import javax.imageio.spi.ImageReaderSpi;
import javax.imageio.stream.ImageInputStream;
import org.junit.jupiter.api.Test;
import org.w3c.dom.NodeList;
import com.twelvemonkeys.imageio.stream.URLImageInputStreamSpi;
class PSDMetadataTest {
static {
IIORegistry.getDefaultInstance().registerServiceProvider(new URLImageInputStreamSpi());
ImageIO.setUseCache(false);
}
protected final PSDImageReaderSpi provider = createProvider();
private PSDImageReaderSpi createProvider() {
return new PSDImageReaderSpi();
}
private PSDImageReader createReader() throws IOException {
return (PSDImageReader) provider.createReaderInstance(null);
}
protected URL getClassLoaderResource(final String resource) {
return getClass().getResource(resource);
}
@Test
void testLayerInfo() throws IOException {
PSDImageReader imageReader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/psd/photoshopping.psd"))) {
imageReader.setInput(stream);
IIOMetadata metadata = imageReader.getImageMetadata(0);
IIOMetadataNode root = (IIOMetadataNode) metadata.getAsTree(PSDMetadata.NATIVE_METADATA_FORMAT_NAME);
NodeList layerInfos = root.getElementsByTagName("LayerInfo");
assertEquals(5, layerInfos.getLength()); // Sanity
IIOMetadataNode layer1Info = (IIOMetadataNode) layerInfos.item(0);
assertEquals("Layer 1", layer1Info.getAttribute("name"));
assertEquals("2", layer1Info.getAttribute("layerId"));
assertEquals("0", layer1Info.getAttribute("top"));
assertEquals("0", layer1Info.getAttribute("left"));
assertEquals("225", layer1Info.getAttribute("bottom"));
assertEquals("300", layer1Info.getAttribute("right"));
assertEquals("norm", layer1Info.getAttribute("blendMode"));
assertEquals("255", layer1Info.getAttribute("opacity"));
assertEquals("base", layer1Info.getAttribute("clipping"));
assertEquals("true", layer1Info.getAttribute("visible"));
assertEquals("8", layer1Info.getAttribute("flags"));
IIOMetadataNode layer2Info = (IIOMetadataNode) layerInfos.item(1);
assertEquals("Layer 0 copy", layer2Info.getAttribute("name"));
assertEquals("11", layer2Info.getAttribute("layerId"));
assertEquals("0", layer2Info.getAttribute("top"));
assertEquals("0", layer2Info.getAttribute("left"));
assertEquals("225", layer2Info.getAttribute("bottom"));
assertEquals("300", layer2Info.getAttribute("right"));
assertEquals("norm", layer2Info.getAttribute("blendMode"));
assertEquals("255", layer2Info.getAttribute("opacity"));
assertEquals("base", layer2Info.getAttribute("clipping"));
assertEquals("true", layer2Info.getAttribute("visible"));
assertEquals("8", layer2Info.getAttribute("flags"));
IIOMetadataNode layer3Info = (IIOMetadataNode) layerInfos.item(2);
assertEquals("Layer 0 copy 2", layer3Info.getAttribute("name"));
assertEquals("12", layer3Info.getAttribute("layerId"));
assertEquals("0", layer3Info.getAttribute("top"));
assertEquals("0", layer3Info.getAttribute("left"));
assertEquals("225", layer3Info.getAttribute("bottom"));
assertEquals("159", layer3Info.getAttribute("right"));
assertEquals("norm", layer3Info.getAttribute("blendMode"));
assertEquals("255", layer3Info.getAttribute("opacity"));
assertEquals("base", layer3Info.getAttribute("clipping"));
assertEquals("true", layer3Info.getAttribute("visible"));
assertEquals("8", layer3Info.getAttribute("flags"));
IIOMetadataNode layer4Info = (IIOMetadataNode) layerInfos.item(3);
assertEquals("Layer 0 copy 3", layer4Info.getAttribute("name"));
assertEquals("13", layer4Info.getAttribute("layerId"));
assertEquals("0", layer4Info.getAttribute("top"));
assertEquals("0", layer4Info.getAttribute("left"));
assertEquals("225", layer4Info.getAttribute("bottom"));
assertEquals("300", layer4Info.getAttribute("right"));
assertEquals("norm", layer4Info.getAttribute("blendMode"));
assertEquals("255", layer4Info.getAttribute("opacity"));
assertEquals("base", layer4Info.getAttribute("clipping"));
assertEquals("false", layer4Info.getAttribute("visible"));
assertEquals("10", layer4Info.getAttribute("flags"));
IIOMetadataNode layer5Info = (IIOMetadataNode) layerInfos.item(4);
assertEquals("Layer 0", layer5Info.getAttribute("name"));
assertEquals("3", layer5Info.getAttribute("layerId"));
assertEquals("0", layer5Info.getAttribute("top"));
assertEquals("0", layer5Info.getAttribute("left"));
assertEquals("225", layer5Info.getAttribute("bottom"));
assertEquals("300", layer5Info.getAttribute("right"));
assertEquals("norm", layer5Info.getAttribute("blendMode"));
assertEquals("255", layer5Info.getAttribute("opacity"));
assertEquals("base", layer5Info.getAttribute("clipping"));
assertEquals("false", layer5Info.getAttribute("visible"));
assertEquals("10", layer5Info.getAttribute("flags"));
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-reference</artifactId>
<name>TwelveMonkeys :: ImageIO :: JDK Reference Tests</name>
@@ -111,6 +111,12 @@ public class JPEGImageReaderTest extends ImageReaderAbstractTest<JPEGImageReader
super.testReadAsRenderedImageIndexOutOfBounds();
}
@Test
@Disabled("JDK 25 now supports reading Exif thumbnails, but does not report thumbnail progress")
public void testThumbnailProgress() throws IOException {
super.testThumbnailProgress();
}
@Test
@Disabled("No test data with JFIF thumbnail")
@Override
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-sgi</artifactId>
<name>TwelveMonkeys :: ImageIO :: SGI plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-tga</artifactId>
<name>TwelveMonkeys :: ImageIO :: TGA plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-thumbsdb</artifactId>
<name>TwelveMonkeys :: ImageIO :: Thumbs.db plugin</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-tiff-jai-interop</artifactId>
<name>TwelveMonkeys :: ImageIO :: TIFF/JAI Metadata Interop</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-tiff-jdk-interop</artifactId>
<name>TwelveMonkeys :: ImageIO :: TIFF/JDK JPEG Interop</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-tiff</artifactId>
<name>TwelveMonkeys :: ImageIO :: TIFF plugin</name>
@@ -71,18 +71,16 @@ public final class TIFFImageMetadata extends AbstractMetadata {
/**
* Creates an empty TIFF metadata object.
*
* Client code can update or change the metadata using the
* {@link #setFromTree(String, Node)}
* or {@link #mergeTree(String, Node)} methods.
*/
public TIFFImageMetadata() {
this(new IFD(Collections.<Entry>emptyList()));
this(new IFD(Collections.emptyList()));
}
/**
* Creates a TIFF metadata object, using the values from the given IFD.
*
* Client code can update or change the metadata using the
* {@link #setFromTree(String, Node)}
* or {@link #mergeTree(String, Node)} methods.
@@ -95,7 +93,6 @@ public final class TIFFImageMetadata extends AbstractMetadata {
/**
* Creates a TIFF metadata object, using the values from the given entries.
*
* Client code can update or change the metadata using the
* {@link #setFromTree(String, Node)}
* or {@link #mergeTree(String, Node)} methods.
@@ -493,10 +490,10 @@ public final class TIFFImageMetadata extends AbstractMetadata {
compressionTypeName.setAttribute("value", "CCITT RLE");
break;
case TIFFExtension.COMPRESSION_CCITT_T4:
compressionTypeName.setAttribute("value", "CCITT T4");
compressionTypeName.setAttribute("value", "CCITT T.4");
break;
case TIFFExtension.COMPRESSION_CCITT_T6:
compressionTypeName.setAttribute("value", "CCITT T6");
compressionTypeName.setAttribute("value", "CCITT T.6");
break;
case TIFFExtension.COMPRESSION_LZW:
compressionTypeName.setAttribute("value", "LZW");
@@ -1038,7 +1035,7 @@ public final class TIFFImageMetadata extends AbstractMetadata {
}
// If we have resolution
if (xRes != null && yRes != null) {
if (xRes != null) { // yRes != null too
// If old unit was DPI, convert values and keep DPI, otherwise use PPCM
Entry resUnitEntry = entries.get(TIFF.TAG_RESOLUTION_UNIT);
int resUnitValue = resUnitEntry != null && resUnitEntry.getValue() != null
@@ -188,6 +188,102 @@ public class TIFFImageMetadataTest {
assertEquals("HP IL v1.1", ((Element) textEntry).getAttribute("value"));
}
@Test
public void testMetadataStandardFormat_CCITT300dpi() throws IOException {
IIOMetadata metadata = createMetadata("/tiff/CCITT-G4-300dpi-StripByteCounts0.tif");
Node root = metadata.getAsTree(IIOMetadataFormatImpl.standardMetadataFormatName);
// Root: "javax_imageio_1.0"
assertNotNull(root);
assertEquals(IIOMetadataFormatImpl.standardMetadataFormatName, root.getNodeName());
assertEquals(5, root.getChildNodes().getLength());
// "Chroma"
Node chroma = root.getFirstChild();
assertEquals("Chroma", chroma.getNodeName());
assertEquals(3, chroma.getChildNodes().getLength());
Node colorSpaceType = chroma.getFirstChild();
assertEquals("ColorSpaceType", colorSpaceType.getNodeName());
assertEquals("GRAY", ((Element) colorSpaceType).getAttribute("name"));
Node numChannels = colorSpaceType.getNextSibling();
assertEquals("NumChannels", numChannels.getNodeName());
assertEquals("1", ((Element) numChannels).getAttribute("value"));
Node blackIsZero = numChannels.getNextSibling();
assertEquals("BlackIsZero", blackIsZero.getNodeName());
assertEquals("FALSE", ((Element) blackIsZero).getAttribute("value"));
// "Compression"
Node compression = chroma.getNextSibling();
assertEquals("Compression", compression.getNodeName());
assertEquals(2, compression.getChildNodes().getLength());
Node compressionTypeName = compression.getFirstChild();
assertEquals("CompressionTypeName", compressionTypeName.getNodeName());
assertEquals("CCITT T.6", ((Element) compressionTypeName).getAttribute("value"));
Node lossless = compressionTypeName.getNextSibling();
assertEquals("Lossless", lossless.getNodeName());
assertEquals(0, lossless.getAttributes().getLength());
// "Data"
Node data = compression.getNextSibling();
assertEquals("Data", data.getNodeName());
assertEquals(4, data.getChildNodes().getLength());
Node planarConfiguration = data.getFirstChild();
assertEquals("PlanarConfiguration", planarConfiguration.getNodeName());
assertEquals("PixelInterleaved", ((Element) planarConfiguration).getAttribute("value"));
Node sampleFormat = planarConfiguration.getNextSibling();
assertEquals("SampleFormat", sampleFormat.getNodeName());
assertEquals("UnsignedIntegral", ((Element) sampleFormat).getAttribute("value"));
Node bitsPerSample = sampleFormat.getNextSibling();
assertEquals("BitsPerSample", bitsPerSample.getNodeName());
assertEquals("1", ((Element) bitsPerSample).getAttribute("value"));
Node sampleMSB = bitsPerSample.getNextSibling();
assertEquals("SampleMSB", sampleMSB.getNodeName());
assertEquals("0", ((Element) sampleMSB).getAttribute("value"));
// "Dimension"
Node dimension = data.getNextSibling();
assertEquals("Dimension", dimension.getNodeName());
assertEquals(4, dimension.getChildNodes().getLength());
Node pixelAspectRatio = dimension.getFirstChild();
assertEquals("PixelAspectRatio", pixelAspectRatio.getNodeName());
assertEquals("1.0", ((Element) pixelAspectRatio).getAttribute("value"));
Node imageOrientation = pixelAspectRatio.getNextSibling();
assertEquals("ImageOrientation", imageOrientation.getNodeName());
assertEquals("Normal", ((Element) imageOrientation).getAttribute("value"));
Node horizontalPixelSize = imageOrientation.getNextSibling();
assertEquals("HorizontalPixelSize", horizontalPixelSize.getNodeName());
assertEquals("0.08466666666666667", ((Element) horizontalPixelSize).getAttribute("value"));
Node verticalPixelSize = horizontalPixelSize.getNextSibling();
assertEquals("VerticalPixelSize", verticalPixelSize.getNodeName());
assertEquals("0.08466666666666667", ((Element) verticalPixelSize).getAttribute("value"));
// "Document"
Node document = dimension.getNextSibling();
assertEquals("Document", document.getNodeName());
assertEquals(1, document.getChildNodes().getLength());
Node formatVersion = document.getFirstChild();
assertEquals("FormatVersion", formatVersion.getNodeName());
assertEquals("6.0", ((Element) formatVersion).getAttribute("value"));
// No more elements
assertNull(document.getNextSibling());
}
@Test
public void testMetadataNativeFormat() throws IOException {
IIOMetadata metadata = createMetadata("/tiff/quad-lzw.tif");
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-webp</artifactId>
<name>TwelveMonkeys :: ImageIO :: WebP plugin</name>
@@ -565,7 +565,7 @@ final class WebPImageReader extends ImageReaderBase {
readVP8Lossless(tempRaster, null, width, height);
// Copy from green (band 1) in temp to alpha in destination
WritableRaster alphaChannel = tempRaster.createWritableChild(0, 0, tempRaster.getWidth(), tempRaster.getHeight(), 0, 0, new int[]{1});
WritableRaster alphaChannel = tempRaster.createWritableChild(0, 0, width, height, 0, 0, new int[]{1});
alphaFilter(alphaChannel, filtering);
copyIntoRasterWithParams(alphaChannel, alphaRaster, param);
break;
@@ -166,73 +166,81 @@ final class HuffmanTable {
if (numPosCodeLens == 1) {
// Length is 0 so mask to clear length bits
Arrays.fill(level1, lengthsAndSymbols[0] & 0xffff);
return;
}
// Due to the layout of the elements this effectively first sorts by length and then symbol.
Arrays.sort(lengthsAndSymbols);
int[] count = new int[16];
for (int lengthAndSymbol : lengthsAndSymbols) {
count[lengthAndSymbol >>> 16]++;
}
// The next code, in the bit order it would appear on the input stream, i.e. it is reversed.
// Only the lowest bits (corresponding to the bit length of the code) are considered.
// Example: code 0..010 (length 2) would appear as 0..001.
int code = 0;
int step = 2;
index = 0;
// Used for level2 lookup
for (int length = 1; length <= LEVEL1_BITS; length++, step <<= 1) {
for (; count[length] > 0; count[length]--) {
int lengthAndSymbol = lengthsAndSymbols[index++];
for (int j = code; j < level1.length; j += step) {
level1[j] = lengthAndSymbol;
}
code = nextCode(code, length);
}
}
int rootMask = (1 << LEVEL1_BITS) - 1;
int rootEntry = -1;
int[] currentTable = null;
for (int i = 0; i < lengthsAndSymbols.length; i++) {
int lengthAndSymbol = lengthsAndSymbols[i];
step = 2;
for (int length = LEVEL1_BITS + 1; length <= 15; length++, step <<= 1) {
for (; count[length] > 0; count[length]--) {
int lengthAndSymbol = lengthsAndSymbols[index++];
int length = lengthAndSymbol >>> 16;
if ((code & rootMask) != rootEntry) {
int level2Bits = nextTableBitSize(count, length, LEVEL1_BITS);
int level2Size = 1 << level2Bits;
if (length <= LEVEL1_BITS) {
for (int j = code; j < level1.length; j += 1 << length) {
level1[j] = lengthAndSymbol;
}
}
else {
// Existing level2 table not fitting
if ((code & ((1 << LEVEL1_BITS) - 1)) != rootEntry) {
// Figure out needed table size.
// Start at current symbol and length.
// Every symbol uses 1 slot at the current bit length.
// Going up 1 bit in length multiplies the slots by 2.
// No more open slots indicate the table size to be big enough.
int maxLength = length;
for (int j = i, openSlots = 1 << (length - LEVEL1_BITS);
j < lengthsAndSymbols.length && openSlots > 0;
j++, openSlots--) {
int innerLength = lengthsAndSymbols[j] >>> 16;
while (innerLength != maxLength) {
maxLength++;
openSlots <<= 1;
}
}
int level2Size = maxLength - LEVEL1_BITS;
currentTable = new int[1 << level2Size];
rootEntry = code & ((1 << LEVEL1_BITS) - 1);
currentTable = new int[level2Size];
rootEntry = code & rootMask;
level2.add(currentTable);
// Set root table indirection
level1[rootEntry] = (LEVEL1_BITS + level2Size) << 16 | (level2.size() - 1);
level1[rootEntry] = (LEVEL1_BITS + level2Bits) << 16 | (level2.size() - 1);
}
// Add to existing (or newly generated) 2nd level table
for (int j = (code >>> LEVEL1_BITS); j < currentTable.length; j += 1 << (length - LEVEL1_BITS)) {
currentTable[j] = (length - LEVEL1_BITS) << 16 | (lengthAndSymbol & 0xffff);
int value = (length - LEVEL1_BITS) << 16 | (lengthAndSymbol & 0xffff);
for (int j = (code >>> LEVEL1_BITS); j < currentTable.length; j += step) {
currentTable[j] = value;
}
code = nextCode(code, length);
}
code = nextCode(code, length);
}
}
private static int nextTableBitSize(int[] count, int length, int rootBits) {
int left = 1 << (length - rootBits);
while (length < 15) {
left -= count[length];
if (left <= 0) {
break;
}
length++;
left <<= 1;
}
return length - rootBits;
}
/**
* Computes the next code
*
@@ -148,8 +148,7 @@ public final class VP8LDecoder {
if (param.getSourceRegion() != null && !param.getSourceRegion().contains(bounds) ||
param.getSourceXSubsampling() != 1 || param.getSourceYSubsampling() != 1) {
// Can't reuse existing
return Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, bounds.width, bounds.height,
4 * bounds.width, 4, new int[] {0, 1, 2, 3}, null);
return createCompatibleRaster(raster, bounds.width, bounds.height);
}
else {
bounds.setLocation(param.getDestinationOffset());
@@ -159,8 +158,7 @@ public final class VP8LDecoder {
if (!raster.getBounds().contains(bounds)) {
// Can't reuse existing
return Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, bounds.width, bounds.height, 4 * bounds.width,
4, new int[] {0, 1, 2, 3}, null);
return createCompatibleRaster(raster, bounds.width, bounds.height);
}
return originSet ?
@@ -169,6 +167,11 @@ public final class VP8LDecoder {
raster;
}
private static WritableRaster createCompatibleRaster(WritableRaster src, int width, int height) {
SampleModel sampleModel = src.getSampleModel().createCompatibleSampleModel(width, height);
return Raster.createWritableRaster(sampleModel, sampleModel.createDataBuffer(), null);
}
/**
* Copy a source raster into a destination raster with optional settings applied.
*/
@@ -182,7 +185,8 @@ public final class VP8LDecoder {
if (sourceXSubsampling == 1 && sourceYSubsampling == 1) {
// Only apply offset (and limit to requested region)
dstRaster.setRect(destinationOffset.x, destinationOffset.y, srcRaster);
dstRaster.setRect(destinationOffset.x, destinationOffset.y, srcRaster.createChild(
sourceRegion.x, sourceRegion.y, sourceRegion.width, sourceRegion.height, 0, 0, null));
}
else {
// Subsampled case
@@ -272,6 +276,12 @@ public final class VP8LDecoder {
private int decodeBwRef(WritableRaster raster, ColorCache colorCache, int width, HuffmanCodeGroup curCodeGroup, byte[] rgba, short code, int x, int y) throws IOException {
int length = lz77decode(code - 256);
int remaining = width * raster.getHeight() - (y * width + x);
if (length > remaining) {
throw new IIOException("Corrupt WebP stream, backward reference exceeds image bounds: length=" + length +
", remaining=" + remaining + ", x=" + x + ", y=" + y);
}
short distancePrefix = curCodeGroup.distanceCode.readSymbol(lsbBitReader);
int distanceCode = lz77decode(distancePrefix);
@@ -298,6 +308,11 @@ public final class VP8LDecoder {
ySrc++;
}
if (ySrc < 0 || ySrc >= raster.getHeight()) {
throw new IIOException("Corrupt WebP stream, backward reference outside image: distance=" + distanceCode +
", x=" + x + ", y=" + y + ", xSrc=" + xSrc + ", ySrc=" + ySrc);
}
for (int l = length; l > 0; x++, l--) {
// Check length and xSrc, ySrc not falling outside raster? (Should not occur if image is correct)
if (x == width) {
@@ -1,3 +1,4 @@
package com.twelvemonkeys.imageio.plugins.webp;
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTest;
@@ -11,6 +12,8 @@ import javax.imageio.stream.MemoryCacheImageInputStream;
import java.awt.*;
import java.awt.image.*;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import static java.util.Arrays.asList;
@@ -43,6 +46,7 @@ public class WebPImageReaderTest extends ImageReaderAbstractTest<WebPImageReader
new TestData(getClassLoaderResource("/webp/1_webp_ll.webp"), new Dimension(400, 301)),
new TestData(getClassLoaderResource("/webp/2_webp_ll.webp"), new Dimension(386, 395)),
new TestData(getClassLoaderResource("/webp/2_webp_ll_alt.webp"), new Dimension(386, 395)),
new TestData(getClassLoaderResource("/webp/2_webp_ll_noalpha.webp"), new Dimension(386, 395)),
new TestData(getClassLoaderResource("/webp/3_webp_ll.webp"), new Dimension(800, 600)),
new TestData(getClassLoaderResource("/webp/4_webp_ll.webp"), new Dimension(421, 163)),
new TestData(getClassLoaderResource("/webp/5_webp_ll.webp"), new Dimension(300, 300)),
@@ -188,4 +192,153 @@ public class WebPImageReaderTest extends ImageReaderAbstractTest<WebPImageReader
reader.dispose();
}
}
@Test
public void testLosslessSourceRegionSubsampling() throws IOException {
WebPImageReader reader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/webp/2_webp_ll_noalpha.webp"))) {
reader.setInput(stream);
// We'll read a small portion of the image using a subsampling factor of 2
ImageReadParam param = reader.getDefaultReadParam();
param.setSourceRegion(new Rectangle(100, 20, 200, 200));
param.setSourceSubsampling(2, 2, 0, 0);
BufferedImage image = reader.read(0, param);
for (int x = 0; x < 23; x++) {
assertRGBEquals("Expected white at (" + x + ", 0)", 0xFFFFFFFF, image.getRGB(x, 0), 0);
}
for (int x = 24; x < 29; x++) {
assertRGBEquals("Expected black at (" + x + ", 0)", 0xFF000000, image.getRGB(x, 0), 0);
}
for (int x = 30; x < 64; x++) {
assertRGBEquals("Expected grey at (" + x + ", 0)", 0xFFF1F1F1, image.getRGB(x, 0), 0);
}
for (int x = 66; x < 69; x++) {
assertRGBEquals("Expected black at (" + x + ", 0)", 0xFF000000, image.getRGB(x, 0), 0);
}
for (int x = 70; x < 100; x++) {
assertRGBEquals("Expected white at (" + x + ", 0)", 0xFFFFFFFF, image.getRGB(x, 0), 0);
}
}
finally {
reader.dispose();
}
}
@Test
public void testLosslessSourceRegionNoSubsampling() throws IOException {
WebPImageReader reader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/webp/2_webp_ll_noalpha.webp"))) {
reader.setInput(stream);
// We'll read a small portion of the image without using subsampling
ImageReadParam param = reader.getDefaultReadParam();
param.setSourceRegion(new Rectangle(100, 20, 200, 200));
BufferedImage image = reader.read(0, param);
for (int x = 0; x < 45; x++) {
assertRGBEquals("Expected white at (" + x + ", 0)", 0xFFFFFFFF, image.getRGB(x, 0), 0);
}
for (int x = 48; x < 58; x++) {
assertRGBEquals("Expected black at (" + x + ", 0)", 0xFF000000, image.getRGB(x, 0), 0);
}
for (int x = 60; x < 128; x++) {
assertRGBEquals("Expected grey at (" + x + ", 0)", 0xFFF1F1F1, image.getRGB(x, 0), 0);
}
for (int x = 131; x < 138; x++) {
assertRGBEquals("Expected black at (" + x + ", 0)", 0xFF000000, image.getRGB(x, 0), 0);
}
for (int x = 140; x < 200; x++) {
assertRGBEquals("Expected white at (" + x + ", 0)", 0xFFFFFFFF, image.getRGB(x, 0), 0);
}
}
finally {
reader.dispose();
}
}
/**
* This test compares alpha channel information that is decoded by the WebPImageReader with the known "good" alpha
* channel information. To generate the known "good" alpha channel information, we use the command line and libwebp,
* e.g.
*
* <pre>{@code
* dwebp imageio/imageio-webp/src/test/resources/webp/lossless.transparent.webp -o /tmp/lossless.transparent.png
* magick /tmp/lossless.transparent.png -alpha extract -depth 8 gray:/tmp/lossless.transparent-alpha.raw
* shasum -a 256 /tmp/lossless.transparent-alpha.raw
* }</pre>
*
* @throws IOException
*/
@Test
public void testReadWriteTransparentWebP() throws IOException {
WebPImageReader reader = createReader();
try (ImageInputStream stream = ImageIO.createImageInputStream(getClassLoaderResource("/webp/lossless.transparent.webp"))) {
reader.setInput(stream);
// Read dimensions
int width = reader.getWidth(0);
int height = reader.getHeight(0);
assertEquals(1920, width, "Expected width of 1920");
assertEquals(1477, height, "Expected height of 1477");
// Read the full image and validate alpha output (exercises long LZ77 back-references).
BufferedImage image = reader.read(0);
assertNotNull(image, "Image should not be null");
assertEquals(width, image.getWidth(), "Image width should match");
assertEquals(height, image.getHeight(), "Image height should match");
assertTrue(image.getColorModel().hasAlpha(), "Image should have alpha channel");
assertEquals("79ffff20392a9cef308b317cbac9d3e57f78e26a4f49fb38b3f3b4dbc4e63c50",
sha256Alpha(image), "Alpha plane hash mismatch");
}
finally {
reader.dispose();
}
}
private static String sha256Alpha(BufferedImage image) {
WritableRaster alphaRaster = image.getAlphaRaster();
assertNotNull(alphaRaster, "Image should have alpha raster");
int width = alphaRaster.getWidth();
int height = alphaRaster.getHeight();
int[] samples = alphaRaster.getSamples(0, 0, width, height, 0, (int[]) null);
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-256");
}
catch (NoSuchAlgorithmException e) {
throw new AssertionError("SHA-256 not available", e);
}
for (int sample : samples) {
digest.update((byte) sample);
}
return toHex(digest.digest());
}
private static String toHex(byte[] bytes) {
StringBuilder builder = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
builder.append(Character.forDigit((b >>> 4) & 0x0f, 16));
builder.append(Character.forDigit(b & 0x0f, 16));
}
return builder.toString();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<artifactId>imageio-xwd</artifactId>
<name>TwelveMonkeys :: ImageIO :: XWD plugin</name>
+4 -7
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>com.twelvemonkeys</groupId>
<artifactId>twelvemonkeys</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.twelvemonkeys.imageio</groupId>
@@ -61,8 +61,7 @@
</modules>
<properties>
<core.version>3.1-SNAPSHOT</core.version>
<imageio.core.version>3.1-SNAPSHOT</imageio.core.version>
<junit.jupiter.version>5.14.2</junit.jupiter.version>
</properties>
<dependencies>
@@ -98,23 +97,21 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
+20 -20
View File
@@ -4,7 +4,7 @@
<groupId>com.twelvemonkeys</groupId>
<artifactId>twelvemonkeys</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>TwelveMonkeys</name>
<description>TwelveMonkeys parent POM</description>
@@ -85,8 +85,8 @@
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
@@ -98,7 +98,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
@@ -112,7 +112,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -160,7 +160,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<executions>
<execution>
<phase>package</phase>
@@ -174,14 +174,14 @@
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
@@ -191,7 +191,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
@@ -199,7 +199,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<version>3.5.0</version>
<inherited>true</inherited>
<executions>
<execution>
@@ -250,7 +250,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<version>3.15.0</version>
<inherited>true</inherited>
<configuration>
<source>8</source>
@@ -265,7 +265,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.3</version>
<version>3.5.4</version>
<configuration>
<systemProperties>
<property>
@@ -278,7 +278,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<version>3.3.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>release</releaseProfiles>
@@ -288,7 +288,7 @@
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>2.1.0</version>
<version>2.2.1</version>
</dependency>
</dependencies>
</plugin>
@@ -300,7 +300,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.5.3</version>
<version>3.5.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -310,7 +310,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.26.0</version>
<version>3.28.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+9 -5
View File
@@ -3,7 +3,7 @@
<parent>
<groupId>com.twelvemonkeys</groupId>
<artifactId>twelvemonkeys</artifactId>
<version>3.12.1-SNAPSHOT</version>
<version>3.13.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,6 +14,10 @@
TwelveMonkeys Servlet support classes.
</description>
<properties>
<junit.jupiter.version>5.14.2</junit.jupiter.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
@@ -24,13 +28,13 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.12.2</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -57,7 +61,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<version>3.5.0</version>
<configuration>
<archive>
<manifestEntries>
@@ -78,7 +82,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
<executions>
<execution>
<id>jakarta</id>