Package com.google.code.appengine.awt.image

Examples of com.google.code.appengine.awt.image.DataBufferByte


            }else if(model == cm && model.getTransferType() == DataBuffer.TYPE_BYTE &&
                    raster.getNumDataElements() == 1){

                byte data[] = (byte[])surfData;
                int scanline = raster.getWidth();
                DataBufferByte dbb = (DataBufferByte) db;
                int rof = dbb.getOffset() + y * scanline + x;
                for(int lineOff = off, line = y; line < y + h;
                    line++, lineOff += scansize, rof += scanline){
                    System.arraycopy(pixels, lineOff, data, rof, w);
                }
            }else if(model == cm && model.getTransferType() == DataBuffer.TYPE_BYTE &&
View Full Code Here


            if(cm instanceof IndexColorModel &&
                    raster.getTransferType() == DataBuffer.TYPE_BYTE ||
                    cm instanceof ComponentColorModel &&
                    raster.getTransferType() == DataBuffer.TYPE_BYTE &&
                    raster.getNumDataElements() == 1){
                DataBufferByte dbb = (DataBufferByte) raster.getDataBuffer();
                byte data[] = dbb.getData();
                int off = dbb.getOffset();
                ic.setPixels(0, 0, width, height, cm, data, off, width);
            }else if(cm instanceof DirectColorModel &&
                    raster.getTransferType() == DataBuffer.TYPE_INT){
                DataBufferInt dbi = (DataBufferInt) raster.getDataBuffer();
                int data[] = dbi.getData();
                int off = dbi.getOffset();
                ic.setPixels(0, 0, width, height, cm, data, off, width);
            }else if(cm instanceof DirectColorModel &&
                    raster.getTransferType() == DataBuffer.TYPE_BYTE){
                DataBufferByte dbb = (DataBufferByte) raster.getDataBuffer();
                byte data[] = dbb.getData();
                int off = dbb.getOffset();
                ic.setPixels(0, 0, width, height, cm, data, off, width);
            }else{
                ColorModel rgbCM = ColorModel.getRGBdefault();
                int pixels[] = new int[width];
                Object pix = null;
View Full Code Here

        DataBuffer data = null;
        int size = (this.height - 1) * scanlineStride + width;

        switch (this.dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(size);
            break;
        case DataBuffer.TYPE_USHORT:
            data = new DataBufferUShort(size);
            break;
        case DataBuffer.TYPE_INT:
View Full Code Here

        int size = (height - 1) * scanlineStride +
        (width - 1) * pixelStride + maxOffset + 1;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(size, numBanks);
            break;
        case DataBuffer.TYPE_SHORT:
            data = new DataBufferShort(size, numBanks);
            break;
        case DataBuffer.TYPE_USHORT:
View Full Code Here

        DataBuffer data = null;
        int size = scanlineStride * height;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(size, numBanks);
            break;
        case DataBuffer.TYPE_SHORT:
        case DataBuffer.TYPE_USHORT:
            data = new DataBufferShort(size, numBanks);
            break;
View Full Code Here

        DataBuffer dataBuffer = null;
        int size = scanlineStride * height;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            dataBuffer = new DataBufferByte(size + (dataBitOffset + 7) / 8);
            break;
        case DataBuffer.TYPE_USHORT:
            dataBuffer = new DataBufferUShort(size + (dataBitOffset + 15) / 16);
            break;
        case DataBuffer.TYPE_INT:
View Full Code Here

        DataBuffer data = null;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(dataSize, numBanks);
            break;
        case DataBuffer.TYPE_USHORT:
            data = new DataBufferUShort(dataSize, numBanks);
            break;
        case DataBuffer.TYPE_INT:
View Full Code Here

        int size = (h - 1) * scanlineStride + w * pixelStride + minOffset;
        DataBuffer data = null;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(size);
            break;
        case DataBuffer.TYPE_USHORT:
            data = new DataBufferUShort(size);
            break;
        }
View Full Code Here

                DataBuffer.getDataTypeSize(dataType) - 1) /
                DataBuffer.getDataTypeSize(dataType)) * h;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(size);
            break;
        case DataBuffer.TYPE_USHORT:
            data = new DataBufferUShort(size);
            break;
        case DataBuffer.TYPE_INT:
View Full Code Here

        DataBuffer data = null;

        switch (dataType) {
        case DataBuffer.TYPE_BYTE:
            data = new DataBufferByte(w * h);
            break;
        case DataBuffer.TYPE_USHORT:
            data = new DataBufferUShort(w * h);
            break;
        case DataBuffer.TYPE_INT:
View Full Code Here

TOP

Related Classes of com.google.code.appengine.awt.image.DataBufferByte

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.