- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.twelvemonkeys.imageio.color.YCbCrConverter
类的一些代码示例,展示了YCbCrConverter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YCbCrConverter
类的具体详情如下:
包路径:com.twelvemonkeys.imageio.color.YCbCrConverter
类名称:YCbCrConverter
[英]Fast YCbCr to RGB conversion.
[中]快速YCbCr到RGB转换。
代码示例来源:origin: haraldk/TwelveMonkeys
private static void convertYCbCr2RGB(final Raster raster, final int numComponents) {
final int height = raster.getHeight();
final int width = raster.getWidth();
final byte[] data = ((DataBufferByte) raster.getDataBuffer()).getData();
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
YCbCrConverter.convertYCbCr2RGB(data, data, (x + y * width) * numComponents);
}
}
}
代码示例来源:origin: haraldk/TwelveMonkeys
public static void convertYCbCr2RGB(final byte[] yCbCr, final byte[] rgb, final int offset) {
int y = yCbCr[offset] & 0xff;
int cr = yCbCr[offset + 2] & 0xff;
int cb = yCbCr[offset + 1] & 0xff;
rgb[offset] = clamp(y + Cr_R_LUT[cr]);
rgb[offset + 1] = clamp(y + (Cb_G_LUT[cb] + Cr_G_LUT[cr] >> SCALEBITS));
rgb[offset + 2] = clamp(y + Cb_B_LUT[cb]);
}
代码示例来源:origin: haraldk/TwelveMonkeys
private static void convertYCCK2CMYK(final Raster raster) {
final int height = raster.getHeight();
final int width = raster.getWidth();
final byte[] data = ((DataBufferByte) raster.getDataBuffer()).getData();
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int offset = (x + y * width) * 4;
// YCC -> CMY
YCbCrConverter.convertYCbCr2RGB(data, data, offset);
// Inverse K
data[offset + 3] = (byte) (0xff - data[offset + 3] & 0xff);
}
}
}
代码示例来源:origin: haraldk/TwelveMonkeys
public static void convertYCbCr2RGB(final byte[] yCbCr, final byte[] rgb, final double[] coefficients, double[] referenceBW, final int offset) {
double y;
double cb;
double cr;
if (referenceBW == null) {
// Default case
y = (yCbCr[offset] & 0xff);
cb = (yCbCr[offset + 1] & 0xff) - 128;
cr = (yCbCr[offset + 2] & 0xff) - 128;
}
else {
// Custom values
y = ((yCbCr[offset] & 0xff) - referenceBW[0]) * 255.0 / (referenceBW[1] - referenceBW[0]);
cb = ((yCbCr[offset + 1] & 0xff) - referenceBW[2]) * 127.0 / (referenceBW[3] - referenceBW[2]);
cr = ((yCbCr[offset + 2] & 0xff) - referenceBW[4]) * 127.0 / (referenceBW[5] - referenceBW[4]);
}
double lumaRed = coefficients[0];
double lumaGreen = coefficients[1];
double lumaBlue = coefficients[2];
int red = (int) Math.round(cr * (2.0 - 2.0 * lumaRed) + y);
int blue = (int) Math.round(cb * (2.0 - 2.0 * lumaBlue) + y);
int green = (int) Math.round((y - lumaRed * red - lumaBlue * blue) / lumaGreen);
rgb[offset] = clamp(red);
rgb[offset + 2] = clamp(blue);
rgb[offset + 1] = clamp(green);
}
代码示例来源:origin: haraldk/TwelveMonkeys
YCbCrConverter.convertYCbCr2RGB(data, data, i);
YCbCrConverter.convertYCbCr2RGB(data, data, coefficients, referenceBW, i);
代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-core
public static void convertYCbCr2RGB(final byte[] yCbCr, final byte[] rgb, final int offset) {
int y = yCbCr[offset] & 0xff;
int cr = yCbCr[offset + 2] & 0xff;
int cb = yCbCr[offset + 1] & 0xff;
rgb[offset] = clamp(y + Cr_R_LUT[cr]);
rgb[offset + 1] = clamp(y + (Cb_G_LUT[cb] + Cr_G_LUT[cr] >> SCALEBITS));
rgb[offset + 2] = clamp(y + Cb_B_LUT[cb]);
}
代码示例来源:origin: haraldk/TwelveMonkeys
YCbCrConverter.convertYCbCr2RGB(thumbData, thumbData, i);
代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-core
public static void convertYCbCr2RGB(final byte[] yCbCr, final byte[] rgb, final double[] coefficients, double[] referenceBW, final int offset) {
double y;
double cb;
double cr;
if (referenceBW == null) {
// Default case
y = (yCbCr[offset] & 0xff);
cb = (yCbCr[offset + 1] & 0xff) - 128;
cr = (yCbCr[offset + 2] & 0xff) - 128;
}
else {
// Custom values
y = ((yCbCr[offset] & 0xff) - referenceBW[0]) * 255.0 / (referenceBW[1] - referenceBW[0]);
cb = ((yCbCr[offset + 1] & 0xff) - referenceBW[2]) * 127.0 / (referenceBW[3] - referenceBW[2]);
cr = ((yCbCr[offset + 2] & 0xff) - referenceBW[4]) * 127.0 / (referenceBW[5] - referenceBW[4]);
}
double lumaRed = coefficients[0];
double lumaGreen = coefficients[1];
double lumaBlue = coefficients[2];
int red = (int) Math.round(cr * (2.0 - 2.0 * lumaRed) + y);
int blue = (int) Math.round(cb * (2.0 - 2.0 * lumaBlue) + y);
int green = (int) Math.round((y - lumaRed * red - lumaBlue * blue) / lumaGreen);
rgb[offset] = clamp(red);
rgb[offset + 2] = clamp(blue);
rgb[offset + 1] = clamp(green);
}
代码示例来源:origin: com.twelvemonkeys.imageio/imageio-jpeg
private static void convertYCbCr2RGB(final Raster raster, final int numComponents) {
final int height = raster.getHeight();
final int width = raster.getWidth();
final byte[] data = ((DataBufferByte) raster.getDataBuffer()).getData();
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
YCbCrConverter.convertYCbCr2RGB(data, data, (x + y * width) * numComponents);
}
}
}
代码示例来源:origin: com.twelvemonkeys.imageio/imageio-jpeg
private static void convertYCCK2CMYK(final Raster raster) {
final int height = raster.getHeight();
final int width = raster.getWidth();
final byte[] data = ((DataBufferByte) raster.getDataBuffer()).getData();
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int offset = (x + y * width) * 4;
// YCC -> CMY
YCbCrConverter.convertYCbCr2RGB(data, data, offset);
// Inverse K
data[offset + 3] = (byte) (0xff - data[offset + 3] & 0xff);
}
}
}
代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-tiff
YCbCrConverter.convertYCbCr2RGB(data, data, i);
YCbCrConverter.convertYCbCr2RGB(data, data, coefficients, referenceBW, i);
代码示例来源:origin: com.twelvemonkeys.imageio/imageio-jpeg
YCbCrConverter.convertYCbCr2RGB(thumbData, thumbData, i);
本文整理了Java中com.twelvemonkeys.imageio.color.YCbCrConverter类的一些代码示例,展示了YCbCrConverter类的具体用法。这些代码示例主要来源于
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader类的一些代码示例,展示了XMPReader类的具体用法。这些代码示例主要来源于Git
本文整理了Java中com.twelvemonkeys.imageio.plugins.tiff.YCbCr16UpsamplerStream类的一些代码示例,展示了YCbCr16UpsamplerS
由于使用 com.sun.imageio.plugins.jpeg.JPEGImageReader 的颜色配置文件不兼容,我遇到了“不支持的图像类型”错误。后来我发现 TwelveMonkeys 插件
我正在使用 maven 构建部署在 tomcat 服务器上的项目。构建过程成功完成,但是当我尝试在 tomcat 7 上部署项目时,它抛出错误。我可以看到 twelemonkey-servlet.ja
本文整理了Java中com.twelvemonkeys.imageio.color.YCbCrConverter.convertYCbCr2RGB()方法的一些代码示例,展示了YCbCrConvert
本文整理了Java中com.twelvemonkeys.imageio.color.YCbCrConverter.clamp()方法的一些代码示例,展示了YCbCrConverter.clamp()的
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.isResourceType()方法的一些代码示例,展示了XMPReader.is
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.parseAttributesForKnownElements()方法的一些代码示
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.getToolkit()方法的一些代码示例,展示了XMPReader.getToo
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.parseAsResource()方法的一些代码示例,展示了XMPReader.p
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.parseDirectories()方法的一些代码示例,展示了XMPReader.
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.getChildTextValue()方法的一些代码示例,展示了XMPReader
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.read()方法的一些代码示例,展示了XMPReader.read()的具体用法。
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.asIterable()方法的一些代码示例,展示了XMPReader.asIter
本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.()方法的一些代码示例,展示了XMPReader.()的具体用法。这些代码示例主要
本文整理了Java中com.twelvemonkeys.imageio.plugins.tiff.YCbCr16UpsamplerStream.()方法的一些代码示例,展示了YCbCr16Upsamp
我需要从 TIFF 文件中提取嵌入的 ICC 配置文件。我可以读取 IIOMetadata 并且我的 IDE 显示包含 ICC 配置文件(标签 ID 34675)的 ifd 字段。但如何将其读取到 I
错误: javax.imageio.IIOException - Unsupported Image Type] javax.imageio.IIOException: Unsupported Ima
我正在使用TwelveMonkey's lib 从 jpeg 读取 Exif 数据,例如: try (ImageInputStream stream = ImageIO.createIm
我是一名优秀的程序员,十分优秀!