Package org.apache.sanselan.common

Examples of org.apache.sanselan.common.IImageMetadata


                Debug.purgeMemory();

            File imageFile = (File) images.get(i);
            Debug.debug("imageFile", imageFile);

            IImageMetadata metadata = Sanselan.getMetadata(imageFile);
            // assertNotNull(metadata);

            Map params = new HashMap();
            ImageInfo imageInfo = Sanselan.getImageInfo(imageFile, params);
            assertNotNull(imageInfo);
View Full Code Here


    public void testSingleImage() throws IOException, ImageReadException {
        File imageFile = getTestImageByName("img_F028c_small.jpg");

        Map params = new HashMap();
        IImageMetadata metadata = Sanselan.getMetadata(imageFile, params);
        assertNotNull(metadata);
        JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
        BufferedImage image = jpegMetadata.getEXIFThumbnail();
        assertNotNull(image);
    }
View Full Code Here

            boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
            params
                    .put(PARAM_KEY_READ_THUMBNAILS, new Boolean(
                            !ignoreImageData));

            IImageMetadata metadata = Sanselan.getMetadata(imageFile, params);
            //            assertNotNull(metadata);
            Debug.debug("metadata", metadata);

            ImageInfo imageInfo = Sanselan.getImageInfo(imageFile, params);
            assertNotNull(imageInfo);
View Full Code Here

        try
        {
            TiffOutputSet outputSet = null;

            // note that metadata might be null if no metadata is found.
            IImageMetadata metadata = Sanselan.getMetadata(jpegImageFile);
            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
            if (null != jpegMetadata)
            {
                // note that exif might be null if no Exif metadata is found.
                TiffImageMetadata exif = jpegMetadata.getExif();
View Full Code Here

        try
        {
            TiffOutputSet outputSet = null;

            // note that metadata might be null if no metadata is found.
            IImageMetadata metadata = Sanselan.getMetadata(jpegImageFile);
            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
            if (null != jpegMetadata)
            {
                // note that exif might be null if no Exif metadata is found.
                TiffImageMetadata exif = jpegMetadata.getExif();
View Full Code Here

        try
        {
            TiffOutputSet outputSet = null;

            // note that metadata might be null if no metadata is found.
            IImageMetadata metadata = Sanselan.getMetadata(jpegImageFile);
            JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
            if (null != jpegMetadata)
            {
                // note that exif might be null if no Exif metadata is found.
                TiffImageMetadata exif = jpegMetadata.getExif();
View Full Code Here

    public static void metadataExample(File file) throws ImageReadException,
            IOException
    {
        //        get all metadata stored in EXIF format (ie. from JPEG or TIFF).
        //            org.w3c.dom.Node node = Sanselan.getMetadataObsolete(imageBytes);
        IImageMetadata metadata = Sanselan.getMetadata(file);

        //System.out.println(metadata);

        if (metadata instanceof JpegImageMetadata)
        {
View Full Code Here

            ImageFormat image_format = Sanselan.guessFormat(imageBytes);
            image_format.equals(ImageFormat.IMAGE_FORMAT_PNG);

            // <b>get all metadata stored in EXIF format (ie. from JPEG or TIFF). </b>
            // <b>org.w3c.dom.Node node = Sanselan.getMetadataObsolete(imageBytes); </b>
            IImageMetadata metdata = Sanselan.getMetadata(imageBytes);

            // <b>print a dump of information about an image to stdout. </b>
            Sanselan.dumpImageFile(imageBytes);

            // <b>get a summary of format errors. </b>
View Full Code Here

    public void testSingleImage() throws IOException, ImageReadException {
        File imageFile = getTestImageByName("Canon Powershot SD750 - 2007.12.26.n.IMG_3704.JPG");

        Map params = new HashMap();

        IImageMetadata metadata = Sanselan.getMetadata(imageFile, params);
        assertNotNull(metadata);
        JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;

        // note that exif might be null if no Exif metadata is found.
        TiffImageMetadata exif = jpegMetadata.getExif();
View Full Code Here

        Map params = new HashMap();
        boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
        params.put(PARAM_KEY_READ_THUMBNAILS, new Boolean(!ignoreImageData));

        // note that metadata might be null if no metadata is found.
        IImageMetadata metadata = Sanselan.getMetadata(imageFile, params);
        if (null == metadata)
            return;
        JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;

        // note that exif might be null if no Exif metadata is found.
View Full Code Here

TOP

Related Classes of org.apache.sanselan.common.IImageMetadata

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.