Examples of JpegComponent


Examples of com.drew.metadata.jpeg.JpegComponent

        super(s);
    }

    public void testGetComponentCharacter() throws Exception
    {
        JpegComponent component;

        component = new JpegComponent(1,2,3);
        assertEquals("Y", component.getComponentName());

        component = new JpegComponent(2,2,3);
        assertEquals("Cb", component.getComponentName());

        component = new JpegComponent(3,2,3);
        assertEquals("Cr", component.getComponentName());

        component = new JpegComponent(4,2,3);
        assertEquals("I", component.getComponentName());

        component = new JpegComponent(5,2,3);
        assertEquals("Q", component.getComponentName());
    }
View Full Code Here

Examples of com.drew.metadata.jpeg.JpegComponent

        assertEquals("3", _directory.getDescription(JpegDirectory.TAG_JPEG_NUMBER_OF_COMPONENTS));
    }

    public void testGetComponent() throws Exception
    {
        JpegComponent component1 = new JpegComponent(1, 2, 3);
        JpegComponent component2 = new JpegComponent(1, 2, 3);
        JpegComponent component3 = new JpegComponent(1, 2, 3);
        JpegComponent component4 = new JpegComponent(1, 2, 3);

        _directory.setObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_1, component1);
        _directory.setObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_2, component2);
        _directory.setObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_3, component3);
        _directory.setObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_4, component4);
View Full Code Here

Examples of com.drew.metadata.jpeg.JpegComponent

        assertEquals("8 bits", _directory.getDescription(JpegDirectory.TAG_JPEG_DATA_PRECISION));
    }

    public void testGetComponentDescription() throws MetadataException
    {
        JpegComponent component1 = new JpegComponent(1, 0x22, 0);
        _directory.setObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_1, component1);
        assertEquals("Y component: Quantization table 0, Sampling factors 2 horiz/2 vert", _directory.getDescription(JpegDirectory.TAG_JPEG_COMPONENT_DATA_1));
        assertEquals("Y component: Quantization table 0, Sampling factors 2 horiz/2 vert", _descriptor.getComponentDataDescription(0));
    }
View Full Code Here

Examples of com.drew.metadata.jpeg.JpegComponent

        assertEquals(3, _directory.getInt(JpegDirectory.TAG_JPEG_NUMBER_OF_COMPONENTS));
    }

    public void testComponentData1() throws Exception
    {
        JpegComponent component = (JpegComponent)_directory.getObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_1);
        assertEquals("Y", component.getComponentName());
        assertEquals(1, component.getComponentId());
        assertEquals(0, component.getQuantizationTableNumber());
        assertEquals(2, component.getHorizontalSamplingFactor());
        assertEquals(2, component.getVerticalSamplingFactor());
    }
View Full Code Here

Examples of com.drew.metadata.jpeg.JpegComponent

        assertEquals(2, component.getVerticalSamplingFactor());
    }

    public void testComponentData2() throws Exception
    {
        JpegComponent component = (JpegComponent)_directory.getObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_2);
        assertEquals("Cb", component.getComponentName());
        assertEquals(2, component.getComponentId());
        assertEquals(1, component.getQuantizationTableNumber());
        assertEquals(1, component.getHorizontalSamplingFactor());
        assertEquals(1, component.getVerticalSamplingFactor());
        assertEquals("Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert", _directory.getDescription(JpegDirectory.TAG_JPEG_COMPONENT_DATA_2));
    }
View Full Code Here

Examples of com.drew.metadata.jpeg.JpegComponent

        assertEquals("Cb component: Quantization table 1, Sampling factors 1 horiz/1 vert", _directory.getDescription(JpegDirectory.TAG_JPEG_COMPONENT_DATA_2));
    }

    public void testComponentData3() throws Exception
    {
        JpegComponent component = (JpegComponent)_directory.getObject(JpegDirectory.TAG_JPEG_COMPONENT_DATA_3);
        assertEquals("Cr", component.getComponentName());
        assertEquals(3, component.getComponentId());
        assertEquals(1, component.getQuantizationTableNumber());
        assertEquals(1, component.getHorizontalSamplingFactor());
        assertEquals(1, component.getVerticalSamplingFactor());
        assertEquals("Cr component: Quantization table 1, Sampling factors 1 horiz/1 vert", _directory.getDescription(JpegDirectory.TAG_JPEG_COMPONENT_DATA_3));
    }
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.