You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "nanfangfanqie (via GitHub)" <gi...@apache.org> on 2024/01/06 13:29:43 UTC
[PR] Avoid NullPointerException in TiffImageParser.getBufferedImage [commons-imaging]
nanfangfanqie opened a new pull request, #347:
URL: https://github.com/apache/commons-imaging/pull/347
Avoid NullPointerException in TiffImageParser.getBufferedImage(TiffDirectory,ByteOrder,TiffImagingParameters) when TiffImagingParameters is null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1879710305
TY @nanfangfanqie ! Merged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "nanfangfanqie (via GitHub)" <gi...@apache.org>.
nanfangfanqie commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1879995094
YRW @garydgregory !
<img width="1300" alt="image" src="https://github.com/apache/commons-imaging/assets/26158436/f71b37bd-f231-49bb-b362-53e35031ecd7">
I meet this error when i try to getBufferedImage from a tiff file, but it's not root cause.
Next code is useful, but the file is privacy, i don't know how to create a file like it, can you help me?
```java
private static BufferedImage getBufferedImage(final TiffDirectory directory) throws ImageReadException, IOException {
if (directory.hasJpegImageData()) {
JpegImageData jpegImageData = directory.getJpegImageData();
return Imaging.getBufferedImage(jpegImageData.getData());
}
return directory.getTiffImage(new TiffImagingParameters());
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #347:
URL: https://github.com/apache/commons-imaging/pull/347
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1880834407
@nanfangfanqie
Great. I am planning a 1.0.0-M1 release within a week or so.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "nanfangfanqie (via GitHub)" <gi...@apache.org>.
nanfangfanqie commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1880352609
> @nanfangfanqie Please try a local build of git master or a snapshot build from https://repository.apache.org/content/repositories/snapshots/ so we can compare a new stack trace to the current code.
Ok, I will try it later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "nanfangfanqie (via GitHub)" <gi...@apache.org>.
nanfangfanqie commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1880761753
> @nanfangfanqie Please try a local build of git master or a snapshot build from https://repository.apache.org/content/repositories/snapshots/ so we can compare a new stack trace to the current code.
@garydgregory Everything is well , the error never occurs !!!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1880041105
> YRW @garydgregory ! <img alt="image" width="1300" src="https://private-user-images.githubusercontent.com/26158436/294746822-f71b37bd-f231-49bb-b362-53e35031ecd7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDQ2Mjk1ODYsIm5iZiI6MTcwNDYyOTI4NiwicGF0aCI6Ii8yNjE1ODQzNi8yOTQ3NDY4MjItZjcxYjM3YmQtZjIzMS00OWJiLWIzNjItNTNlMzUwMzFlY2Q3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTA3VDEyMDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwMjI5NjI5Mjk2YjFjNDliNjU4ODZlMmQxNDZlZDQ5ZmNiNmFjZjQxMmYyNDc3M2JjNTFlN2M1NzAxMDY2MmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.dpKDHfMs4Z2ZlS2EaSGtpCqNbQCT5eMuLVY7pxaR5Y8"> I meet this error when i try to getBufferedImage from a tiff file, but it's not root cause. Next code is useful, but
the file is privacy, i don't know how to create a file like it, can you help me?
>
> ```java
> private static BufferedImage getBufferedImage(final TiffDirectory directory) throws ImageReadException, IOException {
> if (directory.hasJpegImageData()) {
> JpegImageData jpegImageData = directory.getJpegImageData();
> return Imaging.getBufferedImage(jpegImageData.getData());
> }
> return directory.getTiffImage(new TiffImagingParameters());
> }
> ```
I think you're in the best position to recreate one since you've run into the issue yourself. I don't have an image-generator-for-each-line-of-code 😉
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage [commons-imaging]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1879699022
## [Codecov](https://app.codecov.io/gh/apache/commons-imaging/pull/347?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`f02dc84`)](https://app.codecov.io/gh/apache/commons-imaging/commit/f02dc841a3a6952ce0643a98b306a9be1bf847ae?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 71.42% compared to head [(`7b0c4f5`)](https://app.codecov.io/gh/apache/commons-imaging/pull/347?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 71.48%.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #347 +/- ##
============================================
+ Coverage 71.42% 71.48% +0.06%
- Complexity 3576 3581 +5
============================================
Files 352 352
Lines 16921 16921
Branches 2647 2648 +1
============================================
+ Hits 12085 12096 +11
+ Misses 3796 3786 -10
+ Partials 1040 1039 -1
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/commons-imaging/pull/347?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Avoid NullPointerException in TiffImageParser.getBufferedImage() [commons-imaging]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #347:
URL: https://github.com/apache/commons-imaging/pull/347#issuecomment-1880156579
@nanfangfanqie
Please try a local build of git master or a snapshot build from https://repository.apache.org/content/repositories/snapshots/ so we can compare a new stack trace to the current code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org