Comments (8)
Hi Andreas,
Thanks for reporting (and good analysis too)!
This is a known issue (kind of)... The same issue is present if you use an OpenJDK build, rather than an Oracle build of Java 6 or 7, which also uses LCMS rather than KCMS. I think there are a few more tests that fails too, using LCMS (if these pass using JDK 8, cool!).
I haven't filed a bug for it, as I haven't seen the need to support OpenJDK. But if LCMS is the default for JDK 8, it seems we have to take action...
I wasn't aware that you could change color management system using command line, is this a new JDK 8 feature?
For short term, building with KCMS seems like the only option, but then you probably should use that flag at run-time too.
Harald K
from twelvemonkeys.
From what I can see JDK8 (Open~ and Oracle ~) both use LCMS by default now (https://bugs.openjdk.java.net/browse/JDK-8011622).
As to switching: it seems that switching should have been possible before, by using -Dsun.java2d.cmm=sun.java2d.cmm.lcms.LCMS, but this didn't work in my brief testing with JDK 7u45. This is purely based on reading the commit for the bug itself, I haven't found official "documentation" about this feature.
from twelvemonkeys.
if these pass using JDK 8, cool!
Running with
JAVA_HOME=/usr/jdk8 mvn clean install -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider
shows three failures:
Failed tests: testReadSubsamplingBounds1027(com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderTest): expected:<16711421> but was:<16711677>
testReadSubsamplingBounds1026(com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderTest): expected:<16711421> but was:<16711677>
testReadSubsamplingBounds1024(com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderTest): expected:<16711421> but was:<16711677>
These however I also get with JDK 7u45, so they don't seem to be JDK8-specific.
from twelvemonkeys.
Hmmm..
If you have some time to look into this, one think you could test is if the special handling of the broken profile really is needed with LCMS? While the Java implementation in some cases is incompatible with the KCMS one, LCMS seems more lenient about issues like the one that is tested for in the failing test. We might not need it at all.
If the special handling isn't needed, all we need is a way to detect CMS at runtime and skip the hotfix in case of LCMS.
...plus some serious CI-setup on Travis, to make sure we build and test on multiple JDKs/CMSs... :-P
Harald K
from twelvemonkeys.
Re: testReadSubsamplingBounds...
Oh great... I added those tests yesterday (see #39 and #40), and they passed on my setup... I'll have to add some fuzzyness to the assertions I guess...
Please file new issues for these findings if they fail on normal Oracle 7 JDK.
Harald K
from twelvemonkeys.
Will have a look into whether the work-around is needed later today or tomorrow. At the moment JDK8 isn't released, I just noticed the issue in some local test builds (my default JDK is usually a fresh JDK 8 snapshot build to detect such issues before our customers do :D)
from twelvemonkeys.
Fixed in f588d65.
Harald K
from twelvemonkeys.
And better yet, in 94ed531. :-)
Harald K
from twelvemonkeys.
Related Issues (20)
- Question: compatibility with org.apache.commons:commons-imaging ? HOT 2
- Features stopped working after upgrading to JDK 17 HOT 8
- It would be nice if Twelvemonkeys had support for EXIF tag 0xa436 Title HOT 10
- Problematic inconsistence in JPEG color space detection: TwelveMonkey vs standard Java API HOT 9
- Wrong colors with CMYK JPEG HOT 1
- Webp: cannot decode grayscale images HOT 5
- NPE while read a PSD file HOT 3
- Unable to modify a JPEGImage10Metadata comment value HOT 17
- JPEG: Preserve metadata when writing CMYK HOT 5
- The OSGi support only exports the ImageReaderSpi services and not the ImageWriterSpi services HOT 1
- BMP: Write support for more ARGB types HOT 1
- Some malformed PSD images never return from `ImageIO.read()` using 3.10.0 HOT 2
- WebP: Images decoded with yellow tint HOT 1
- Possible bug in Half.shortBitsToFloat HOT 5
- Troubleshooting with ImageIO plugin registry issue (NoClassDefFoundErrors) without web.xml file HOT 1
- YCCK JPEG from a PDF with wrong colors HOT 5
- TIFF: Support SAMPLEFORMAT_COMPLEXINT (5) HOT 3
- WebP plugin stops working when other plugins are enabled too HOT 2
- PSD: Get layer kind (type) to metadata HOT 1
- Twelvemonkeys Servlet should support Jakarta HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twelvemonkeys.