gpt4 book ai didi

com.twelvemonkeys.imageio.plugins.tiff.YCbCr16UpsamplerStream类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 20:08:31 26 4
gpt4 key购买 nike

本文整理了Java中com.twelvemonkeys.imageio.plugins.tiff.YCbCr16UpsamplerStream类的一些代码示例,展示了YCbCr16UpsamplerStream类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YCbCr16UpsamplerStream类的具体详情如下:
包路径:com.twelvemonkeys.imageio.plugins.tiff.YCbCr16UpsamplerStream
类名称:YCbCr16UpsamplerStream

YCbCr16UpsamplerStream介绍

[英]Input stream that provides on-the-fly upsampling of TIFF subsampled YCbCr 16 bit samples.
[中]提供TIFF二次采样YCbCr 16位样本动态上采样的输入流。

代码示例

代码示例来源:origin: haraldk/TwelveMonkeys

private void fetch() throws IOException {
  if (bufferPos >= bufferLength) {
    int pos = 0;
    int read;
    // This *SHOULD* read an entire row of units into the buffer, otherwise decodeRows will throw EOFException
    while (pos < buffer.length && (read = in.read(buffer, pos, buffer.length - pos)) > 0) {
      pos += read;
    }
    bufferLength = pos;
    bufferPos = 0;
  }
  if (bufferLength > 0) {
    decodeRows();
  }
  else {
    decodedLength = -1;
  }
}

代码示例来源:origin: haraldk/TwelveMonkeys

@Override
public int read() throws IOException {
  if (decodedLength < 0) {
    return -1;
  }
  if (decodedPos >= decodedLength) {
    fetch();
    if (decodedLength < 0) {
      return -1;
    }
  }
  return decodedRows[decodedPos++] & 0xff;
}

代码示例来源:origin: haraldk/TwelveMonkeys

adapter = new YCbCr16UpsamplerStream(adapter, yCbCrSubsampling, yCbCrPos, colsInTile, imageInput.getByteOrder());

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-tiff

adapter = new YCbCr16UpsamplerStream(adapter, yCbCrSubsampling, yCbCrPos, colsInTile, imageInput.getByteOrder());

代码示例来源:origin: haraldk/TwelveMonkeys

@Override
public long skip(long n) throws IOException {
  if (decodedLength < 0) {
    return -1;
  }
  if (decodedPos >= decodedLength) {
    fetch();
    if (decodedLength < 0) {
      return -1;
    }
  }
  int skipped = (int) Math.min(decodedLength - decodedPos, n);
  decodedPos += skipped;
  return skipped;
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-tiff

private void fetch() throws IOException {
  if (bufferPos >= bufferLength) {
    int pos = 0;
    int read;
    // This *SHOULD* read an entire row of units into the buffer, otherwise decodeRows will throw EOFException
    while (pos < buffer.length && (read = in.read(buffer, pos, buffer.length - pos)) > 0) {
      pos += read;
    }
    bufferLength = pos;
    bufferPos = 0;
  }
  if (bufferLength > 0) {
    decodeRows();
  }
  else {
    decodedLength = -1;
  }
}

代码示例来源:origin: haraldk/TwelveMonkeys

@Override
public int read(byte[] b, int off, int len) throws IOException {
  if (decodedLength < 0) {
    return -1;
  }
  if (decodedPos >= decodedLength) {
    fetch();
    if (decodedLength < 0) {
      return -1;
    }
  }
  int read = Math.min(decodedLength - decodedPos, len);
  System.arraycopy(decodedRows, decodedPos, b, off, read);
  decodedPos += read;
  return read;
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-tiff

@Override
public int read() throws IOException {
  if (decodedLength < 0) {
    return -1;
  }
  if (decodedPos >= decodedLength) {
    fetch();
    if (decodedLength < 0) {
      return -1;
    }
  }
  return decodedRows[decodedPos++] & 0xff;
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-tiff

@Override
public long skip(long n) throws IOException {
  if (decodedLength < 0) {
    return -1;
  }
  if (decodedPos >= decodedLength) {
    fetch();
    if (decodedLength < 0) {
      return -1;
    }
  }
  int skipped = (int) Math.min(decodedLength - decodedPos, n);
  decodedPos += skipped;
  return skipped;
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-tiff

@Override
public int read(byte[] b, int off, int len) throws IOException {
  if (decodedLength < 0) {
    return -1;
  }
  if (decodedPos >= decodedLength) {
    fetch();
    if (decodedLength < 0) {
      return -1;
    }
  }
  int read = Math.min(decodedLength - decodedPos, len);
  System.arraycopy(decodedRows, decodedPos, b, off, read);
  decodedPos += read;
  return read;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com