Examples of PackBits


Examples of org.apache.commons.imaging.common.PackBits

                final int index = channel * height + y;
                final byte[] packed = BinaryFunctions.readBytes("scanline",
                        is, scanlineBytecounts[index],
                        "PSD: Missing Image Data");

                final byte[] unpacked = new PackBits().decompress(packed, width);
                final InputStream bais = new ByteArrayInputStream(unpacked);
                final MyBitInputStream mbis = new MyBitInputStream(bais, ByteOrder.BIG_ENDIAN);
                BitsToByteInputStream bbis = null;
                boolean canThrow = false;
                try {
View Full Code Here

Examples of org.apache.commons.imaging.common.PackBits

            return myLzwDecompressor.decompress(is, expectedSize);
        }

        case TIFF_COMPRESSION_PACKBITS: // Packbits
        {
            return new PackBits().decompress(compressed, expectedSize);
        }

        default:
            throw new ImageReadException("Tiff: unknown/unsupported compression: " + compression);
        }
View Full Code Here

Examples of org.apache.commons.imaging.common.PackBits

                strips[i] = T4AndT6Compression.compressT6(strips[i], width,
                        strips[i].length / ((width + 7) / 8));
            }
        } else if (compression == TIFF_COMPRESSION_PACKBITS) {
            for (int i = 0; i < strips.length; i++) {
                strips[i] = new PackBits().compress(strips[i]);
            }
        } else if (compression == TIFF_COMPRESSION_LZW) {
            for (int i = 0; i < strips.length; i++) {
                final byte[] uncompressed = strips[i];
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

                return result;
            }

            case TIFF_COMPRESSION_PACKBITS : // Packbits
            {
                byte unpacked[] = new PackBits().decompress(compressed,
                        expected_size);
                count++;

                return unpacked;
            }
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

                int index = channel * height + y;
                byte packed[] = bfp.readByteArray("scanline",
                        scanline_bytecounts[index], is,
                        "PSD: Missing Image Data");

                byte unpacked[] = new PackBits().decompress(packed, width);
                InputStream bais = new ByteArrayInputStream(unpacked);
                MyBitInputStream mbis = new MyBitInputStream(bais,
                        BYTE_ORDER_MSB);
                BitsToByteInputStream bbis = new BitsToByteInputStream(mbis, 8); // we want all samples to be bytes
                int scanline[] = bbis.readBitsArray(depth, width);
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

        // System.out.println("stripCount: " + stripCount);

        if (compression == TIFF_COMPRESSION_PACKBITS)
        {
            for (int i = 0; i < strips.length; i++)
                strips[i] = new PackBits().compress(strips[i]);
        } else if (compression == TIFF_COMPRESSION_LZW)
        {
            for (int i = 0; i < strips.length; i++)
            {
                byte uncompressed[] = strips[i];
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

    //        System.out.println("stripCount: " + stripCount);

    if (compression == TIFF_COMPRESSION_PACKBITS)
    {
      for (int i = 0; i < strips.length; i++)
        strips[i] = new PackBits().compress(strips[i]);
    }
    else if (compression == TIFF_COMPRESSION_LZW)
    {
      for (int i = 0; i < strips.length; i++)
      {
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

        return result;
      }

      case TIFF_COMPRESSION_PACKBITS : // Packbits
      {
        byte unpacked[] = new PackBits().decompress(compressed,
            expected_size);
        count++;

        return unpacked;
      }
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

    // System.out.println("stripCount: " + stripCount);

    if (compression == TIFF_COMPRESSION_PACKBITS)
    {
      for (int i = 0; i < strips.length; i++)
        strips[i] = new PackBits().compress(strips[i]);
    } else if (compression == TIFF_COMPRESSION_LZW)
    {
      for (int i = 0; i < strips.length; i++)
      {
        byte uncompressed[] = strips[i];
View Full Code Here

Examples of org.apache.sanselan.common.PackBits

        int index = channel * height + y;
        byte packed[] = bfp.readByteArray("scanline",
            scanline_bytecounts[index], is,
            "PSD: Missing Image Data");

        byte unpacked[] = new PackBits().decompress(packed, width);
        InputStream bais = new ByteArrayInputStream(unpacked);
        MyBitInputStream mbis = new MyBitInputStream(bais,
            BYTE_ORDER_MSB);
        BitsToByteInputStream bbis = new BitsToByteInputStream(mbis, 8); // we want all samples to be bytes
        int scanline[] = bbis.readBitsArray(depth, width);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.