/* 701 */ scanlineStride = rect.width;
/* 702 */ bdata = ImageUtil.getUnpackedBinaryData(raster, rect);
/* 703 */ this.formatTag |= 128;
/* */ }
/* */
/* 706 */ this.mlimages[0] = new mediaLibImage(mlibType, 1, rect.width, rect.height, scanlineStride, 0, bdata);
/* */
/* 714 */ return;
/* */ }
/* */
/* 717 */ if ((formatTag & 0x80) == 0) {
/* 718 */ ComponentSampleModel csm = (ComponentSampleModel)raster.getSampleModel();
/* */
/* 721 */ this.numBands = csm.getNumBands();
/* 722 */ this.bandOffsets = csm.getBandOffsets();
/* 723 */ int dataOffset = raster.getDataBuffer().getOffset();
/* 724 */ dataOffset += (rect.y - raster.getSampleModelTranslateY()) * csm.getScanlineStride() + (rect.x - raster.getSampleModelTranslateX()) * csm.getPixelStride();
/* */
/* 731 */ int scanlineStride = csm.getScanlineStride();
/* */
/* 733 */ switch (formatTag & 0x7F) {
/* */ case 0:
/* 735 */ DataBufferByte dbb = (DataBufferByte)raster.getDataBuffer();
/* 736 */ this.mlimages = new mediaLibImage[1];
/* 737 */ this.mlimages[0] = new mediaLibImage(1, this.numBands, rect.width, rect.height, scanlineStride, dataOffset, dbb.getData());
/* */
/* 745 */ break;
/* */ case 1:
/* 748 */ DataBufferUShort dbus = (DataBufferUShort)raster.getDataBuffer();
/* */
/* 750 */ this.mlimages = new mediaLibImage[1];
/* 751 */ this.mlimages[0] = new mediaLibImage(6, this.numBands, rect.width, rect.height, scanlineStride, dataOffset, dbus.getData());
/* */
/* 759 */ break;
/* */ case 2:
/* 761 */ DataBufferShort dbs = (DataBufferShort)raster.getDataBuffer();
/* 762 */ this.mlimages = new mediaLibImage[1];
/* 763 */ this.mlimages[0] = new mediaLibImage(2, this.numBands, rect.width, rect.height, scanlineStride, dataOffset, dbs.getData());
/* */
/* 771 */ break;
/* */ case 3:
/* 773 */ DataBufferInt dbi = (DataBufferInt)raster.getDataBuffer();
/* 774 */ this.mlimages = new mediaLibImage[1];
/* 775 */ this.mlimages[0] = new mediaLibImage(3, this.numBands, rect.width, rect.height, scanlineStride, dataOffset, dbi.getData());
/* */
/* 783 */ break;
/* */ case 4:
/* 785 */ DataBuffer dbf = raster.getDataBuffer();
/* 786 */ this.mlimages = new mediaLibImage[1];
/* 787 */ this.mlimages[0] = new mediaLibImage(4, this.numBands, rect.width, rect.height, scanlineStride, dataOffset, DataBufferUtils.getDataFloat(dbf));
/* */
/* 795 */ break;
/* */ case 5:
/* 797 */ DataBuffer dbd = raster.getDataBuffer();
/* 798 */ this.mlimages = new mediaLibImage[1];
/* 799 */ this.mlimages[0] = new mediaLibImage(5, this.numBands, rect.width, rect.height, scanlineStride, dataOffset, DataBufferUtils.getDataDouble(dbd));
/* */
/* 807 */ break;
/* */ default:
/* 809 */ throw new IllegalArgumentException((formatTag & 0x7F) + JaiI18N.getString("MediaLibAccessor1"));
/* */ }
/* */ }
/* */ else {
/* 813 */ this.numBands = raster.getNumBands();
/* 814 */ this.bandOffsets = new int[this.numBands];
/* 815 */ for (int i = 0; i < this.numBands; i++) {
/* 816 */ this.bandOffsets[i] = i;
/* */ }
/* 818 */ int scanlineStride = rect.width * this.numBands;
/* */
/* 820 */ switch (formatTag & 0x7F) {
/* */ case 0:
/* 822 */ byte[] bdata = new byte[rect.width * rect.height * this.numBands];
/* 823 */ this.mlimages = new mediaLibImage[1];
/* 824 */ this.mlimages[0] = new mediaLibImage(1, this.numBands, rect.width, rect.height, scanlineStride, 0, bdata);
/* */
/* 832 */ break;
/* */ case 1:
/* 834 */ short[] usdata = new short[rect.width * rect.height * this.numBands];
/* 835 */ this.mlimages = new mediaLibImage[1];
/* 836 */ this.mlimages[0] = new mediaLibImage(6, this.numBands, rect.width, rect.height, scanlineStride, 0, usdata);
/* */
/* 844 */ break;
/* */ case 2:
/* 846 */ short[] sdata = new short[rect.width * rect.height * this.numBands];
/* 847 */ this.mlimages = new mediaLibImage[1];
/* 848 */ this.mlimages[0] = new mediaLibImage(2, this.numBands, rect.width, rect.height, scanlineStride, 0, sdata);
/* */
/* 856 */ break;
/* */ case 3:
/* 858 */ int[] idata = new int[rect.width * rect.height * this.numBands];
/* 859 */ this.mlimages = new mediaLibImage[1];
/* 860 */ this.mlimages[0] = new mediaLibImage(3, this.numBands, rect.width, rect.height, scanlineStride, 0, idata);
/* */
/* 868 */ break;
/* */ case 4:
/* 870 */ float[] fdata = new float[rect.width * rect.height * this.numBands];
/* 871 */ this.mlimages = new mediaLibImage[1];
/* 872 */ this.mlimages[0] = new mediaLibImage(4, this.numBands, rect.width, rect.height, scanlineStride, 0, fdata);
/* */
/* 880 */ break;
/* */ case 5:
/* 882 */ double[] ddata = new double[rect.width * rect.height * this.numBands];
/* 883 */ this.mlimages = new mediaLibImage[1];
/* 884 */ this.mlimages[0] = new mediaLibImage(5, this.numBands, rect.width, rect.height, scanlineStride, 0, ddata);
/* */
/* 892 */ break;
/* */ default:
/* 894 */ throw new IllegalArgumentException((formatTag & 0x7F) + JaiI18N.getString("MediaLibAccessor1"));
/* */ }