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 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\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-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, ≈424🔥, 0💬
Popular Posts:
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
jTDS JDBC Driver Source Code Files are provided in the source package file, jtds-1.3.1-fyi.zip. You ...
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-s...
JDK 11 java.sql.jmod is the JMOD file for JDK 11 SQL (Structured Query Language) module. JDK 11 SQL ...