Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java
/*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.imageio.plugins.tiff;
import javax.imageio.plugins.tiff.BaselineTIFFTagSet;
import javax.imageio.plugins.tiff.TIFFField;
public class TIFFYCbCrColorConverter extends TIFFColorConverter {
private static final float CODING_RANGE_Y = 255.0f;
private static final float CODING_RANGE_CB_CR = 127.0f;
private float lumaRed = 0.299f;
private float lumaGreen = 0.587f;
private float lumaBlue = 0.114f;
private float referenceBlackY = 0.0f;
private float referenceWhiteY = 255.0f;
private float referenceBlackCb = 128.0f;
private float referenceWhiteCb = 255.0f;
private float referenceBlackCr = 128.0f;
private float referenceWhiteCr = 255.0f;
public TIFFYCbCrColorConverter(TIFFImageMetadata metadata) {
TIFFImageMetadata tmetadata = metadata;
TIFFField f =
tmetadata.getTIFFField(BaselineTIFFTagSet.TAG_Y_CB_CR_COEFFICIENTS);
if (f != null && f.getCount() == 3) {
this.lumaRed = f.getAsFloat(0);
this.lumaGreen = f.getAsFloat(1);
this.lumaBlue = f.getAsFloat(2);
}
f =
tmetadata.getTIFFField(BaselineTIFFTagSet.TAG_REFERENCE_BLACK_WHITE);
if (f != null && f.getCount() == 6) {
this.referenceBlackY = f.getAsFloat(0);
this.referenceWhiteY = f.getAsFloat(1);
this.referenceBlackCb = f.getAsFloat(2);
this.referenceWhiteCb = f.getAsFloat(3);
this.referenceBlackCr = f.getAsFloat(4);
this.referenceWhiteCr = f.getAsFloat(5);
}
}
/*
The full range component value is converted from the code by:
FullRangeValue = (code - ReferenceBlack) * CodingRange
/ (ReferenceWhite - ReferenceBlack);
The code is converted from the full-range component value by:
code = (FullRangeValue * (ReferenceWhite - ReferenceBlack)
/ CodingRange) + ReferenceBlack;
*/
public void fromRGB(float r, float g, float b, float[] result) {
// Convert RGB to full-range YCbCr.
float Y = (lumaRed*r + lumaGreen*g + lumaBlue*b);
float Cb = (b - Y)/(2 - 2*lumaBlue);
float Cr = (r - Y)/(2 - 2*lumaRed);
// Convert full-range YCbCr to code.
result[0] = Y*(referenceWhiteY - referenceBlackY)/CODING_RANGE_Y +
referenceBlackY;
result[1] = Cb*(referenceWhiteCb - referenceBlackCb)/CODING_RANGE_CB_CR +
referenceBlackCb;
result[2] = Cr*(referenceWhiteCr - referenceBlackCr)/CODING_RANGE_CB_CR +
referenceBlackCr;
}
public void toRGB(float x0, float x1, float x2, float[] rgb) {
// Convert YCbCr code to full-range YCbCr.
float Y = (x0 - referenceBlackY)*CODING_RANGE_Y/
(referenceWhiteY - referenceBlackY);
float Cb = (x1 - referenceBlackCb)*CODING_RANGE_CB_CR/
(referenceWhiteCb - referenceBlackCb);
float Cr = (x2 - referenceBlackCr)*CODING_RANGE_CB_CR/
(referenceWhiteCr - referenceBlackCr);
// Convert YCbCr to RGB.
rgb[0] = Cr*(2 - 2*lumaRed) + Y;
rgb[2] = Cb*(2 - 2*lumaBlue) + Y;
rgb[1] = (Y - lumaBlue*rgb[2] - lumaRed*rgb[0])/lumaGreen;
}
}
⏎ com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, ≈747🔥, 5💬
Popular Posts:
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...
What Is fop.jar? I got it from the fop-2.7-bin.zip. fop.jar in fop-2.7-bin.zip is the JAR file for F...
JDK 17 jdk.jshell.jmod is the JMOD file for JDK 17 JShell tool, which can be invoked by the "jshell"...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...