当前位置: 首页>>代码示例>>Java>>正文


Java DataBuffer.TYPE_SHORT属性代码示例

本文整理汇总了Java中java.awt.image.DataBuffer.TYPE_SHORT属性的典型用法代码示例。如果您正苦于以下问题:Java DataBuffer.TYPE_SHORT属性的具体用法?Java DataBuffer.TYPE_SHORT怎么用?Java DataBuffer.TYPE_SHORT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.awt.image.DataBuffer的用法示例。


在下文中一共展示了DataBuffer.TYPE_SHORT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBuffer

/**
  * Create a data buffer of a particular type.
  *
  * @param dataType the desired data type of the buffer.
  * @param size the size of the data buffer bank
  * @param numBanks the number of banks the buffer should have
  */
 public static DataBuffer createBuffer(int dataType, int size, int numBanks)
 {
   switch (dataType)
     {
     case DataBuffer.TYPE_BYTE:
return new DataBufferByte(size, numBanks);
     case DataBuffer.TYPE_SHORT:
return new DataBufferShort(size, numBanks);
     case DataBuffer.TYPE_USHORT:
return new DataBufferUShort(size, numBanks);
     case DataBuffer.TYPE_INT:
return new DataBufferInt(size, numBanks);
     case DataBuffer.TYPE_FLOAT:
return new DataBufferFloat(size, numBanks);
     case DataBuffer.TYPE_DOUBLE:
return new DataBufferDouble(size, numBanks);
     default:
throw new UnsupportedOperationException();
     }
 }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Buffers.java

示例2: createBufferFromData

/**
  * Create a data buffer of a particular type.
  *
  * @param dataType the desired data type of the buffer
  * @param data an array containing the data
  * @param size the size of the data buffer bank
  */
 public static DataBuffer createBufferFromData(int dataType, Object data,
					int size)
 {
   switch (dataType)
     {
     case DataBuffer.TYPE_BYTE:
return new DataBufferByte((byte[]) data, size);
     case DataBuffer.TYPE_SHORT:
return new DataBufferShort((short[]) data, size);
     case DataBuffer.TYPE_USHORT:
return new DataBufferUShort((short[]) data, size);
     case DataBuffer.TYPE_INT:
return new DataBufferInt((int[]) data, size);
     case DataBuffer.TYPE_FLOAT:
return new DataBufferFloat((float[]) data, size);
     case DataBuffer.TYPE_DOUBLE:
return new DataBufferDouble((double[]) data, size);
     default:
throw new UnsupportedOperationException();
     }
 }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:Buffers.java

示例3: getDTName

static String getDTName(int dType) {
    switch(dType) {
        case DataBuffer.TYPE_BYTE:
            return "TYPE_BYTE";
        case DataBuffer.TYPE_DOUBLE:
            return "TYPE_DOUBLE";
        case DataBuffer.TYPE_FLOAT:
            return "TYPE_FLOAT";
        case DataBuffer.TYPE_INT:
            return "TYPE_INT";
        case DataBuffer.TYPE_SHORT:
            return "TYPE_SHORT";
        case DataBuffer.TYPE_USHORT:
            return "TYPE_USHORT";
        case DataBuffer.TYPE_UNDEFINED:
            return "TYPE_UNDEFINED";
    }
    return "UNKNOWN";
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:19,代码来源:ColConvTest.java

示例4: getDataTypeSize

/**
 * Return the number of bits occupied by {@code dataType}
 * which must be one of the {@code DataBuffer} {@code TYPE}s.
 */
private static int getDataTypeSize(int dataType) throws IIOException {
    int dataTypeSize = 0;
    switch(dataType) {
    case DataBuffer.TYPE_BYTE:
        dataTypeSize = 8;
        break;
    case DataBuffer.TYPE_SHORT:
    case DataBuffer.TYPE_USHORT:
        dataTypeSize = 16;
        break;
    case DataBuffer.TYPE_INT:
    case DataBuffer.TYPE_FLOAT:
        dataTypeSize = 32;
        break;
    case DataBuffer.TYPE_DOUBLE:
        dataTypeSize = 64;
        break;
    default:
        throw new IIOException("Unknown data type "+dataType);
    }

    return dataTypeSize;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:TIFFDecompressor.java

示例5: createXorPixelWriter

static PixelWriter createXorPixelWriter(SunGraphics2D sg2d,
                                        SurfaceData sData)
{
    ColorModel dstCM = sData.getColorModel();

    Object srcPixel = dstCM.getDataElements(sg2d.eargb, null);

    XORComposite comp = (XORComposite)sg2d.getComposite();
    int xorrgb = comp.getXorColor().getRGB();
    Object xorPixel = dstCM.getDataElements(xorrgb, null);

    switch (dstCM.getTransferType()) {
    case DataBuffer.TYPE_BYTE:
        return new XorPixelWriter.ByteData(srcPixel, xorPixel);
    case DataBuffer.TYPE_SHORT:
    case DataBuffer.TYPE_USHORT:
        return new XorPixelWriter.ShortData(srcPixel, xorPixel);
    case DataBuffer.TYPE_INT:
        return new XorPixelWriter.IntData(srcPixel, xorPixel);
    case DataBuffer.TYPE_FLOAT:
        return new XorPixelWriter.FloatData(srcPixel, xorPixel);
    case DataBuffer.TYPE_DOUBLE:
        return new XorPixelWriter.DoubleData(srcPixel, xorPixel);
    default:
        throw new InternalError("Unsupported XOR pixel type");
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:GeneralRenderer.java

示例6: rgbToPixel

public int rgbToPixel(int rgb, ColorModel cm) {
    Object obj = cm.getDataElements(rgb, null);
    switch (cm.getTransferType()) {
    case DataBuffer.TYPE_BYTE:
        byte[] bytearr = (byte[]) obj;
        int pix = 0;

        switch(bytearr.length) {
        default: // bytearr.length >= 4
            pix = bytearr[3] << 24;
            // FALLSTHROUGH
        case 3:
            pix |= (bytearr[2] & 0xff) << 16;
            // FALLSTHROUGH
        case 2:
            pix |= (bytearr[1] & 0xff) << 8;
            // FALLSTHROUGH
        case 1:
            pix |= (bytearr[0] & 0xff);
        }

        return pix;
    case DataBuffer.TYPE_SHORT:
    case DataBuffer.TYPE_USHORT:
        short[] shortarr = (short[]) obj;

        return (((shortarr.length > 1) ? shortarr[1] << 16 : 0) |
                shortarr[0] & 0xffff);
    case DataBuffer.TYPE_INT:
        return ((int[]) obj)[0];
    default:
        return rgb;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:PixelConverter.java

示例7: rgbToPixel

@SuppressWarnings("fallthrough")
public int rgbToPixel(int rgb, ColorModel cm) {
    Object obj = cm.getDataElements(rgb, null);
    switch (cm.getTransferType()) {
    case DataBuffer.TYPE_BYTE:
        byte[] bytearr = (byte[]) obj;
        int pix = 0;

        switch(bytearr.length) {
        default: // bytearr.length >= 4
            pix = bytearr[3] << 24;
            // FALLSTHROUGH
        case 3:
            pix |= (bytearr[2] & 0xff) << 16;
            // FALLSTHROUGH
        case 2:
            pix |= (bytearr[1] & 0xff) << 8;
            // FALLSTHROUGH
        case 1:
            pix |= (bytearr[0] & 0xff);
        }

        return pix;
    case DataBuffer.TYPE_SHORT:
    case DataBuffer.TYPE_USHORT:
        short[] shortarr = (short[]) obj;

        return (((shortarr.length > 1) ? shortarr[1] << 16 : 0) |
                shortarr[0] & 0xffff);
    case DataBuffer.TYPE_INT:
        return ((int[]) obj)[0];
    default:
        return rgb;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:35,代码来源:PixelConverter.java

示例8: getDataTypeFromNumBits

private static int getDataTypeFromNumBits(int numBits, boolean isSigned) {
    int dataType;

    if (numBits <= 8) {
        dataType = DataBuffer.TYPE_BYTE;
    } else if (numBits <= 16) {
        dataType = isSigned ?
            DataBuffer.TYPE_SHORT : DataBuffer.TYPE_USHORT;
    } else {
        dataType = DataBuffer.TYPE_INT;
    }

    return dataType;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:TIFFDecompressor.java

示例9: Interleaved

public Interleaved(ColorSpace colorSpace,
                   int[] bandOffsets,
                   int dataType,
                   boolean hasAlpha,
                   boolean isAlphaPremultiplied) {
    if (colorSpace == null) {
        throw new IllegalArgumentException("colorSpace == null!");
    }
    if (bandOffsets == null) {
        throw new IllegalArgumentException("bandOffsets == null!");
    }
    int numBands = colorSpace.getNumComponents() +
        (hasAlpha ? 1 : 0);
    if (bandOffsets.length != numBands) {
        throw new IllegalArgumentException
            ("bandOffsets.length is wrong!");
    }
    if (dataType != DataBuffer.TYPE_BYTE &&
        dataType != DataBuffer.TYPE_SHORT &&
        dataType != DataBuffer.TYPE_USHORT &&
        dataType != DataBuffer.TYPE_INT &&
        dataType != DataBuffer.TYPE_FLOAT &&
        dataType != DataBuffer.TYPE_DOUBLE) {
        throw new IllegalArgumentException
            ("Bad value for dataType!");
    }
    this.colorSpace = colorSpace;
    this.bandOffsets = bandOffsets.clone();
    this.dataType = dataType;
    this.hasAlpha = hasAlpha;
    this.isAlphaPremultiplied = isAlphaPremultiplied;

    this.colorModel =
        ImageTypeSpecifier.createComponentCM(colorSpace,
                                             bandOffsets.length,
                                             dataType,
                                             hasAlpha,
                                             isAlphaPremultiplied);

    int minBandOffset = bandOffsets[0];
    int maxBandOffset = minBandOffset;
    for (int i = 0; i < bandOffsets.length; i++) {
        int offset = bandOffsets[i];
        minBandOffset = Math.min(offset, minBandOffset);
        maxBandOffset = Math.max(offset, maxBandOffset);
    }
    int pixelStride = maxBandOffset - minBandOffset + 1;

    int w = 1;
    int h = 1;
    this.sampleModel =
        new PixelInterleavedSampleModel(dataType,
                                        w, h,
                                        pixelStride,
                                        w*pixelStride,
                                        bandOffsets);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:57,代码来源:ImageTypeSpecifier.java

示例10: Banded

public Banded(ColorSpace colorSpace,
              int[] bankIndices,
              int[] bandOffsets,
              int dataType,
              boolean hasAlpha,
              boolean isAlphaPremultiplied) {
    if (colorSpace == null) {
        throw new IllegalArgumentException("colorSpace == null!");
    }
    if (bankIndices == null) {
        throw new IllegalArgumentException("bankIndices == null!");
    }
    if (bandOffsets == null) {
        throw new IllegalArgumentException("bandOffsets == null!");
    }
    if (bankIndices.length != bandOffsets.length) {
        throw new IllegalArgumentException
            ("bankIndices.length != bandOffsets.length!");
    }
    if (dataType != DataBuffer.TYPE_BYTE &&
        dataType != DataBuffer.TYPE_SHORT &&
        dataType != DataBuffer.TYPE_USHORT &&
        dataType != DataBuffer.TYPE_INT &&
        dataType != DataBuffer.TYPE_FLOAT &&
        dataType != DataBuffer.TYPE_DOUBLE) {
        throw new IllegalArgumentException
            ("Bad value for dataType!");
    }
    int numBands = colorSpace.getNumComponents() +
        (hasAlpha ? 1 : 0);
    if (bandOffsets.length != numBands) {
        throw new IllegalArgumentException
            ("bandOffsets.length is wrong!");
    }

    this.colorSpace = colorSpace;
    this.bankIndices = (int[])bankIndices.clone();
    this.bandOffsets = (int[])bandOffsets.clone();
    this.dataType = dataType;
    this.hasAlpha = hasAlpha;
    this.isAlphaPremultiplied = isAlphaPremultiplied;

    this.colorModel =
        ImageTypeSpecifier.createComponentCM(colorSpace,
                                             bankIndices.length,
                                             dataType,
                                             hasAlpha,
                                             isAlphaPremultiplied);

    int w = 1;
    int h = 1;
    this.sampleModel = new BandedSampleModel(dataType,
                                             w, h,
                                             w,
                                             bankIndices,
                                             bandOffsets);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:57,代码来源:ImageTypeSpecifier.java

示例11: Grayscale

public Grayscale(int bits,
                 int dataType,
                 boolean isSigned,
                 boolean hasAlpha,
                 boolean isAlphaPremultiplied)
{
    if (bits != 1 && bits != 2 && bits != 4 &&
        bits != 8 && bits != 16)
    {
        throw new IllegalArgumentException("Bad value for bits!");
    }
    if (dataType != DataBuffer.TYPE_BYTE &&
        dataType != DataBuffer.TYPE_SHORT &&
        dataType != DataBuffer.TYPE_USHORT)
    {
        throw new IllegalArgumentException
            ("Bad value for dataType!");
    }
    if (bits > 8 && dataType == DataBuffer.TYPE_BYTE) {
        throw new IllegalArgumentException
            ("Too many bits for dataType!");
    }

    this.bits = bits;
    this.dataType = dataType;
    this.isSigned = isSigned;
    this.hasAlpha = hasAlpha;
    this.isAlphaPremultiplied = isAlphaPremultiplied;

    ColorSpace colorSpace = ColorSpace.getInstance(ColorSpace.CS_GRAY);

    if ((bits == 8 && dataType == DataBuffer.TYPE_BYTE) ||
        (bits == 16 &&
         (dataType == DataBuffer.TYPE_SHORT ||
          dataType == DataBuffer.TYPE_USHORT))) {
        // Use component color model & sample model

        int numBands = hasAlpha ? 2 : 1;
        int transparency =
            hasAlpha ? Transparency.TRANSLUCENT : Transparency.OPAQUE;


        int[] nBits = new int[numBands];
        nBits[0] = bits;
        if (numBands == 2) {
            nBits[1] = bits;
        }
        this.colorModel =
            new ComponentColorModel(colorSpace,
                                    nBits,
                                    hasAlpha,
                                    isAlphaPremultiplied,
                                    transparency,
                                    dataType);

        int[] bandOffsets = new int[numBands];
        bandOffsets[0] = 0;
        if (numBands == 2) {
            bandOffsets[1] = 1;
        }

        int w = 1;
        int h = 1;
        this.sampleModel =
            new PixelInterleavedSampleModel(dataType,
                                            w, h,
                                            numBands, w*numBands,
                                            bandOffsets);
    } else {
        int numEntries = 1 << bits;
        byte[] arr = new byte[numEntries];
        for (int i = 0; i < numEntries; i++) {
            arr[i] = (byte)(i*255/(numEntries - 1));
        }
        this.colorModel =
            new IndexColorModel(bits, numEntries, arr, arr, arr);

        this.sampleModel =
            new MultiPixelPackedSampleModel(dataType, 1, 1, bits);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:81,代码来源:ImageTypeSpecifier.java

示例12: getData

/**
  * Copy data from array contained in data buffer, much like
  * System.arraycopy. Create a suitable destination array if the
  * given destination array is null.
  */
 public static Object getData(DataBuffer src, int srcOffset,
		       Object dest,  int dstOffset,
		       int length)
 {
   Object from;
   switch(src.getDataType())
     {
     case DataBuffer.TYPE_BYTE:
if (dest == null) dest = new byte[length+dstOffset];
for(int i = 0; i < length; i++)
  ((byte[])dest)[i + dstOffset] = (byte)src.getElem(i + srcOffset);
break;

     case DataBuffer.TYPE_DOUBLE:
if (dest == null) dest = new double[length+dstOffset];
for(int i = 0; i < length; i++)
  ((double[])dest)[i + dstOffset] = src.getElemDouble(i + srcOffset);
break;

     case DataBuffer.TYPE_FLOAT:
if (dest == null) dest = new float[length+dstOffset];
for(int i = 0; i < length; i++)
  ((float[])dest)[i + dstOffset] = src.getElemFloat(i + srcOffset);
break;

     case DataBuffer.TYPE_INT:
if (dest == null) dest = new int[length+dstOffset];
for(int i = 0; i < length; i++)
  ((int[])dest)[i + dstOffset] = src.getElem(i + srcOffset);
break;

     case DataBuffer.TYPE_SHORT:
     case DataBuffer.TYPE_USHORT:
if (dest == null) dest = new short[length+dstOffset];
for(int i = 0; i < length; i++)
  ((short[])dest)[i + dstOffset] = (short)src.getElem(i + srcOffset);
break;

     case DataBuffer.TYPE_UNDEFINED:
throw new ClassCastException("Unknown data buffer type");
     }
   return dest;
 }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:48,代码来源:Buffers.java

示例13: Banded

public Banded(ColorSpace colorSpace,
              int[] bankIndices,
              int[] bandOffsets,
              int dataType,
              boolean hasAlpha,
              boolean isAlphaPremultiplied) {
    if (colorSpace == null) {
        throw new IllegalArgumentException("colorSpace == null!");
    }
    if (bankIndices == null) {
        throw new IllegalArgumentException("bankIndices == null!");
    }
    if (bandOffsets == null) {
        throw new IllegalArgumentException("bandOffsets == null!");
    }
    if (bankIndices.length != bandOffsets.length) {
        throw new IllegalArgumentException
            ("bankIndices.length != bandOffsets.length!");
    }
    if (dataType != DataBuffer.TYPE_BYTE &&
        dataType != DataBuffer.TYPE_SHORT &&
        dataType != DataBuffer.TYPE_USHORT &&
        dataType != DataBuffer.TYPE_INT &&
        dataType != DataBuffer.TYPE_FLOAT &&
        dataType != DataBuffer.TYPE_DOUBLE) {
        throw new IllegalArgumentException
            ("Bad value for dataType!");
    }
    int numBands = colorSpace.getNumComponents() +
        (hasAlpha ? 1 : 0);
    if (bandOffsets.length != numBands) {
        throw new IllegalArgumentException
            ("bandOffsets.length is wrong!");
    }

    this.colorSpace = colorSpace;
    this.bankIndices = bankIndices.clone();
    this.bandOffsets = bandOffsets.clone();
    this.dataType = dataType;
    this.hasAlpha = hasAlpha;
    this.isAlphaPremultiplied = isAlphaPremultiplied;

    this.colorModel =
        ImageTypeSpecifier.createComponentCM(colorSpace,
                                             bankIndices.length,
                                             dataType,
                                             hasAlpha,
                                             isAlphaPremultiplied);

    int w = 1;
    int h = 1;
    this.sampleModel = new BandedSampleModel(dataType,
                                             w, h,
                                             w,
                                             bankIndices,
                                             bandOffsets);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:57,代码来源:ImageTypeSpecifier.java

示例14: Interleaved

public Interleaved(ColorSpace colorSpace,
                   int[] bandOffsets,
                   int dataType,
                   boolean hasAlpha,
                   boolean isAlphaPremultiplied) {
    if (colorSpace == null) {
        throw new IllegalArgumentException("colorSpace == null!");
    }
    if (bandOffsets == null) {
        throw new IllegalArgumentException("bandOffsets == null!");
    }
    int numBands = colorSpace.getNumComponents() +
        (hasAlpha ? 1 : 0);
    if (bandOffsets.length != numBands) {
        throw new IllegalArgumentException
            ("bandOffsets.length is wrong!");
    }
    if (dataType != DataBuffer.TYPE_BYTE &&
        dataType != DataBuffer.TYPE_SHORT &&
        dataType != DataBuffer.TYPE_USHORT &&
        dataType != DataBuffer.TYPE_INT &&
        dataType != DataBuffer.TYPE_FLOAT &&
        dataType != DataBuffer.TYPE_DOUBLE) {
        throw new IllegalArgumentException
            ("Bad value for dataType!");
    }
    this.colorSpace = colorSpace;
    this.bandOffsets = (int[])bandOffsets.clone();
    this.dataType = dataType;
    this.hasAlpha = hasAlpha;
    this.isAlphaPremultiplied = isAlphaPremultiplied;

    this.colorModel =
        ImageTypeSpecifier.createComponentCM(colorSpace,
                                             bandOffsets.length,
                                             dataType,
                                             hasAlpha,
                                             isAlphaPremultiplied);

    int minBandOffset = bandOffsets[0];
    int maxBandOffset = minBandOffset;
    for (int i = 0; i < bandOffsets.length; i++) {
        int offset = bandOffsets[i];
        minBandOffset = Math.min(offset, minBandOffset);
        maxBandOffset = Math.max(offset, maxBandOffset);
    }
    int pixelStride = maxBandOffset - minBandOffset + 1;

    int w = 1;
    int h = 1;
    this.sampleModel =
        new PixelInterleavedSampleModel(dataType,
                                        w, h,
                                        pixelStride,
                                        w*pixelStride,
                                        bandOffsets);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:57,代码来源:ImageTypeSpecifier.java

示例15: Indexed

public Indexed(byte[] redLUT,
               byte[] greenLUT,
               byte[] blueLUT,
               byte[] alphaLUT,
               int bits,
               int dataType) {
    if (redLUT == null || greenLUT == null || blueLUT == null) {
        throw new IllegalArgumentException("LUT is null!");
    }
    if (bits != 1 && bits != 2 && bits != 4 &&
        bits != 8 && bits != 16) {
        throw new IllegalArgumentException("Bad value for bits!");
    }
    if (dataType != DataBuffer.TYPE_BYTE &&
        dataType != DataBuffer.TYPE_SHORT &&
        dataType != DataBuffer.TYPE_USHORT &&
        dataType != DataBuffer.TYPE_INT) {
        throw new IllegalArgumentException
            ("Bad value for dataType!");
    }
    if ((bits > 8 && dataType == DataBuffer.TYPE_BYTE) ||
        (bits > 16 && dataType != DataBuffer.TYPE_INT)) {
        throw new IllegalArgumentException
            ("Too many bits for dataType!");
    }

    int len = 1 << bits;
    if (redLUT.length != len ||
        greenLUT.length != len ||
        blueLUT.length != len ||
        (alphaLUT != null && alphaLUT.length != len)) {
        throw new IllegalArgumentException("LUT has improper length!");
    }
    this.redLUT = (byte[])redLUT.clone();
    this.greenLUT = (byte[])greenLUT.clone();
    this.blueLUT = (byte[])blueLUT.clone();
    if (alphaLUT != null) {
        this.alphaLUT = (byte[])alphaLUT.clone();
    }
    this.bits = bits;
    this.dataType = dataType;

    if (alphaLUT == null) {
        this.colorModel = new IndexColorModel(bits,
                                              redLUT.length,
                                              redLUT,
                                              greenLUT,
                                              blueLUT);
    } else {
        this.colorModel = new IndexColorModel(bits,
                                              redLUT.length,
                                              redLUT,
                                              greenLUT,
                                              blueLUT,
                                              alphaLUT);
    }

    if ((bits == 8 && dataType == DataBuffer.TYPE_BYTE) ||
        (bits == 16 &&
         (dataType == DataBuffer.TYPE_SHORT ||
          dataType == DataBuffer.TYPE_USHORT))) {
        int[] bandOffsets = { 0 };
        this.sampleModel =
            new PixelInterleavedSampleModel(dataType,
                                            1, 1, 1, 1,
                                            bandOffsets);
    } else {
        this.sampleModel =
            new MultiPixelPackedSampleModel(dataType, 1, 1, bits);
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:71,代码来源:ImageTypeSpecifier.java


注:本文中的java.awt.image.DataBuffer.TYPE_SHORT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。