jdk icon indicating copy to clipboard operation
jdk copied to clipboard

TIFF plugin: JPEG compression and alpha channel is not supported

Open Karm opened this issue 3 years ago • 8 comments

This is a followup on email thread: https://mail.openjdk.java.net/pipermail/client-libs-dev/2022-May/004882.html

The gist is that having transparency (alpha) in a JPEG compressed TIFF container is not supported. Unsupported Image Type exception used to be thrown before JDK-8274735 [openjdk/jdk/pull/7849] got integrated. Since then, the 4 components JPEG from such TIFF file is erroneously interpreted as CMYK, while in fact it is an unsupported RGBA.

This commit makes the TIFFImageReader to throw a meaningful exception informing user that such combination of colour space and compression is not supported.

The accompanying test verifies that the exception is indeed thrown when expected.


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [ ] Commit message must refer to an issue

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8846/head:pull/8846
$ git checkout pull/8846

Update a local copy of the PR:
$ git checkout pull/8846
$ git pull https://git.openjdk.java.net/jdk pull/8846/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8846

View PR using the GUI difftool:
$ git pr show -t 8846

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8846.diff

Karm avatar May 23 '22 15:05 Karm

:wave: Welcome back Karm! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar May 23 '22 15:05 bridgekeeper[bot]

@Karm The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar May 23 '22 15:05 openjdk[bot]

@prrace Would it be O.K. to move this forward?

Karm avatar May 30 '22 14:05 Karm

Hello @prrace, Is there anything specific I could do for this PR?

Thx for guidance.

Karm avatar Jun 11 '22 08:06 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jul 09 '22 09:07 bridgekeeper[bot]

Hello, I would still like this PR to be included as it prevents a silent misinterpretation of data in TIFF plugin.

Are there any changes you'd like me to do, @prrace?

Karm avatar Jul 11 '22 07:07 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Aug 08 '22 16:08 bridgekeeper[bot]

ping

Karm avatar Aug 11 '22 15:08 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Sep 08 '22 21:09 bridgekeeper[bot]

ping @prrace ?

Karm avatar Sep 28 '22 12:09 Karm

LGTM. I'm not qualified to comment on the test code, but the new error presents a useful message. The method already throws an IIOException, so no problems there. You'll need a JBS issue for this to continue, but I don't have access to it yet either. I'm sorry this PR has been stuck in limbo.

SWinxy avatar Oct 08 '22 18:10 SWinxy

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Nov 07 '22 21:11 bridgekeeper[bot]

Thanks bridgekeeper :)

Karm avatar Nov 08 '22 22:11 Karm

@SWinxy, @prrace ? :-)

Karm avatar Nov 08 '22 22:11 Karm

I don't have reviewer permissions, and I don't think I ever will. They do not want pseudonymous developers, and I want my privacy.

SWinxy avatar Nov 08 '22 22:11 SWinxy

Hello @jaikiran, give them an inch and they'll take a mile, as they say. With @prrace being otherwise engaged, would you happen to be knowledgeable enough about client libs, namely graphics formats encoders/decoders to set up this PR for a review too?

Cheers K.

Karm avatar Nov 29 '22 12:11 Karm

Hello @jaikiran, give them an inch and they'll take a mile, as they say. With @prrace being otherwise engaged, would you happen to be knowledgeable enough about client libs, namely graphics formats encoders/decoders to set up this PR for a review too?

Cheers K.

Hello @Karm, I don't have the knowledge of the client area of the JDK to provide any inputs on this proposed change. Phil is the right person.

It looks to me that this PR hasn't triggered an official review since this doesn't have a corresponding JBS issue created and linked to it. So that means that the discussion in this PR isn't being auto copied to the client-libs-dev mailing list. I don't know if Phil watches the github personal notifications. I think, wait for a day or two more and then check on the client-libs-dev team on their mailing list https://mail.openjdk.org/mailman/listinfo/client-libs-dev on how to proceed.

jaikiran avatar Nov 30 '22 13:11 jaikiran

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Dec 28 '22 18:12 bridgekeeper[bot]

Adding a new comment...

Karm avatar Dec 28 '22 19:12 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jan 26 '23 01:01 bridgekeeper[bot]

Adding comment...

I'd still like to see this through or get a feedback as to why it's not suitable.

Karm avatar Jan 26 '23 06:01 Karm

@Karm Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

openjdk[bot] avatar Feb 17 '23 19:02 openjdk[bot]

Ping

Karm avatar Feb 20 '23 11:02 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Mar 20 '23 15:03 bridgekeeper[bot]

😔

Karm avatar Mar 20 '23 17:03 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Apr 18 '23 01:04 bridgekeeper[bot]

@prrace ?

Karm avatar Apr 18 '23 22:04 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar May 17 '23 00:05 bridgekeeper[bot]

Ping.

Karm avatar May 18 '23 15:05 Karm

@Karm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jun 15 '23 23:06 bridgekeeper[bot]