Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

black stain issue #28

Open
whammoed opened this issue Apr 12, 2019 · 10 comments
Open

black stain issue #28

whammoed opened this issue Apr 12, 2019 · 10 comments

Comments

@whammoed
Copy link

There is an issue with "black stains" or "ink blots" etc appearing in some images.
See here for more info:
https://issues.apache.org/jira/browse/PDFBOX-1752
https://issues.apache.org/jira/browse/PDFBOX-1819
can be fixed by applying:
faceless2@b203429
faceless2@94e047e

@Jugen
Copy link
Contributor

Jugen commented Apr 15, 2019

This is fixed by PR #24

@whammoed
Copy link
Author

whammoed commented Apr 15, 2019

This is fixed by PR #24

I am still seeing this issue using:
jai-imageio-core 1.3.1
jai-imageio-jpeg2000 1.3.0

@THausherr
Copy link

Because 1.3.0 is from 2015. If you want to test the change, then you'd have to build from the repository.

@whammoed
Copy link
Author

Because 1.3.0 is from 2015. If you want to test the change, then you'd have to build from the repository.

Thanks, that's what I planned on doing. I was thinking Jugen meant that the issue was fixed in a release.

@whammoed
Copy link
Author

Because 1.3.0 is from 2015. If you want to test the change, then you'd have to build from the repository.

THKausherr,
I have built my own jai-imageio-jpeg2000-1.3.1-SNAPSHOT.jar and added it to my project library but now I get this error like I don't have it:
Cannot read JPEG2000 image: Java Advanced Imaging (JAI) Image I/O Tools are not installed
any idea why this may be?

@THausherr
Copy link

You need to make sure that the new jar is part of your classpath, and also that the old jar isn't. And this must also be at runtime.

@whammoed
Copy link
Author

whammoed commented Apr 16, 2019

You need to make sure that the new jar is part of your classpath, and also that the old jar isn't. And this must also be at runtime.

Maybe I am building the J2000 jar incorrectly.
I am building jai-imageio-jpeg2000-1.3.1-SNAPSHOT.jar by: Export>Java>Jar file
To my project I added libs folder
I added libs folder to Java Build Path>Source
I copied my jai-imageio-jpeg2000-1.3.1-SNAPSHOT.jar to the libs folder
I added external jar in Java Build Path>Libraries
I removed jai-imageio-jpeg2000 1.3.0 Maven dependency
I get the Cannot read JPEG2000 image: Java Advanced Imaging (JAI) Image I/O Tools are not installed error
I remove my jar and copy the original 1.3.0 jar to my libs folder and add that external jar...then it works but obviously with the black stain.

**I realize I shouldn't need to add the libs folder to source but have been trying everything to get this to work

EDIT: built jar using Run As>Maven Install and now it works. Using the maven reference now instead of adding external jar. Just wasn't thinking I guess. Thanks for the help, the black stains are now gone.

@THausherr
Copy link

My built jai-imageio-jpeg2000-1.3.1-SNAPSHOT.jar has a size of 456KB.

Another trick to see whether the file is in your classpath would be to access a class from there, e.g. com.github.jaiimageio.jpeg2000.J2KImageReadParam .

@whammoed
Copy link
Author

My built jai-imageio-jpeg2000-1.3.1-SNAPSHOT.jar has a size of 456KB.

Another trick to see whether the file is in your classpath would be to access a class from there, e.g. com.github.jaiimageio.jpeg2000.J2KImageReadParam .

built jar using Run As>Maven Install and now it works. Using the maven reference now instead of adding external jar. Just wasn't thinking I guess. Thanks for the help, the black stains are now gone.

@THausherr
Copy link

Ink blot problem now fixed, thanks. But the second PR mentioned at the beginning of this issue ( faceless2@94e047e ) wasn't committed, that one prevents garbled images in rare cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants