Package org.apache.sanselan.formats.jpeg

Examples of org.apache.sanselan.formats.jpeg.Block


            int xMCUs = (sofnSegment.width + hSize - 1) / hSize;
            int yMCUs = (sofnSegment.height + vSize - 1) / vSize;
            Block[] mcu = allocateMCUMemory();
            Block[] scaledMCU = new Block[mcu.length];
            for (int i = 0; i < scaledMCU.length; i++)
                scaledMCU[i] = new Block(hSize, vSize);
            int[] preds = new int[sofnSegment.numberOfComponents];
            ColorModel colorModel;
            WritableRaster raster;
            if (sofnSegment.numberOfComponents == 3)
            {
View Full Code Here


    private void rescaleMCU(Block[] dataUnits, int hSize, int vSize, Block[] ret)
    {
        for (int i = 0; i < dataUnits.length; i++)
        {
            Block block = dataUnits[i];
            if (block.width == hSize && block.height == vSize)
                System.arraycopy(block.samples, 0, ret[i].samples, 0, hSize*vSize);
            else
            {
                int hScale = hSize / block.width;
View Full Code Here

                    break;
                }
            }
            if (frameComponent == null)
                throw new ImageReadException("Invalid component");
            Block fullBlock = new Block(
                    8*frameComponent.horizontalSamplingFactor,
                    8*frameComponent.verticalSamplingFactor);
            mcu[i] = fullBlock;
        }
        return mcu;
View Full Code Here

                    break;
                }
            }
            if (frameComponent == null)
                throw new ImageReadException("Invalid component");
            Block fullBlock = mcu[i];
            for (int y = 0; y < frameComponent.verticalSamplingFactor; y++)
            {
                for (int x = 0; x < frameComponent.horizontalSamplingFactor; x++)
                {
                    Arrays.fill(zz, 0);
View Full Code Here

            int xMCUs = (sofnSegment.width + hSize - 1) / hSize;
            int yMCUs = (sofnSegment.height + vSize - 1) / vSize;
            Block[] mcu = allocateMCUMemory();
            Block[] scaledMCU = new Block[mcu.length];
            for (int i = 0; i < scaledMCU.length; i++)
                scaledMCU[i] = new Block(hSize, vSize);
            int[] preds = new int[sofnSegment.numberOfComponents];
            ColorModel colorModel;
            WritableRaster raster;
            if (sofnSegment.numberOfComponents == 3)
            {
View Full Code Here

    private void rescaleMCU(Block[] dataUnits, int hSize, int vSize, Block[] ret)
    {
        for (int i = 0; i < dataUnits.length; i++)
        {
            Block block = dataUnits[i];
            if (block.width == hSize && block.height == vSize)
                System.arraycopy(block.samples, 0, ret[i].samples, 0, hSize*vSize);
            else
            {
                int hScale = hSize / block.width;
View Full Code Here

                    break;
                }
            }
            if (frameComponent == null)
                throw new ImageReadException("Invalid component");
            Block fullBlock = new Block(
                    8*frameComponent.horizontalSamplingFactor,
                    8*frameComponent.verticalSamplingFactor);
            mcu[i] = fullBlock;
        }
        return mcu;
View Full Code Here

                    break;
                }
            }
            if (frameComponent == null)
                throw new ImageReadException("Invalid component");
            Block fullBlock = mcu[i];
            for (int y = 0; y < frameComponent.verticalSamplingFactor; y++)
            {
                for (int x = 0; x < frameComponent.horizontalSamplingFactor; x++)
                {
                    Arrays.fill(zz, 0);
View Full Code Here

TOP

Related Classes of org.apache.sanselan.formats.jpeg.Block

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.