Package org.apache.xmpbox.type

Examples of org.apache.xmpbox.type.ThumbnailType


        if (altThumbs == null)
        {
            altThumbs = createArrayProperty(THUMBNAILS, Cardinality.Alt);
            addProperty(altThumbs);
        }
        ThumbnailType thumb = new ThumbnailType(getMetadata());
        thumb.setHeight(height);
        thumb.setWidth(width);
        thumb.setFormat(format);
        thumb.setImage(img);
        altThumbs.getContainer().addProperty(thumb);
    }
View Full Code Here


        String format = "JPEG";
        String img = "/9j/4AAQSkZJRgABAgEASABIAAD";
        setMethod.invoke(schema, height, width, format, img);
        List<ThumbnailType> found = ((List<ThumbnailType>) getMethod.invoke(schema));
        Assert.assertTrue(found.size() == 1);
        ThumbnailType t1 = found.get(0);
        Assert.assertEquals(height, t1.getHeight());
        Assert.assertEquals(width, t1.getWidth());
        Assert.assertEquals(format, t1.getFormat());
        Assert.assertEquals(img, t1.getImage());

    }
View Full Code Here

        // THUMBNAILS TEST
        List<ThumbnailType> thumbs = metadata.getXMPBasicSchema().getThumbnailsProperty();
        Assert.assertNotNull(thumbs);
        Assert.assertEquals(2, thumbs.size());

        ThumbnailType thumb = thumbs.get(0);
        Assert.assertEquals(new Integer(162), thumb.getHeight());
        Assert.assertEquals(new Integer(216), thumb.getWidth());
        Assert.assertEquals("JPEG", thumb.getFormat());
        Assert.assertEquals("/9j/4AAQSkZJRgABAgEASABIAAD", thumb.getImage());

        thumb = thumbs.get(1);
        Assert.assertEquals(new Integer(162), thumb.getHeight());
        Assert.assertEquals(new Integer(216), thumb.getWidth());
        Assert.assertEquals("JPEG", thumb.getFormat());
        Assert.assertEquals("/9j/4AAQSkZJRgABAgEASABIAAD", thumb.getImage());

    }
View Full Code Here

        // THUMBNAILS TEST
        List<ThumbnailType> thumbs = metadata.getXMPBasicSchema().getThumbnailsProperty();
        Assert.assertNotNull(thumbs);
        Assert.assertEquals(2, thumbs.size());

        ThumbnailType thumb = thumbs.get(0);
        Assert.assertEquals(new Integer(162), thumb.getHeight());
        Assert.assertEquals(new Integer(216), thumb.getWidth());
        Assert.assertEquals("JPEG", thumb.getFormat());
        Assert.assertEquals("/9j/4AAQSkZJRgABAgEASABIAAD", thumb.getImage());

        thumb = thumbs.get(1);
        Assert.assertEquals(new Integer(162), thumb.getHeight());
        Assert.assertEquals(new Integer(216), thumb.getWidth());
        Assert.assertEquals("JPEG", thumb.getFormat());
        Assert.assertEquals("/9j/4AAQSkZJRgABAgEASABIAAD", thumb.getImage());

    }
View Full Code Here

        String format = "JPEG";
        String img = "/9j/4AAQSkZJRgABAgEASABIAAD";
        setMethod.invoke(schema, height, width, format, img);
        List<ThumbnailType> found = ((List<ThumbnailType>) getMethod.invoke(schema));
        Assert.assertTrue(found.size() == 1);
        ThumbnailType t1 = found.get(0);
        Assert.assertEquals(height, t1.getHeight());
        Assert.assertEquals(width, t1.getWidth());
        Assert.assertEquals(format, t1.getFormat());
        Assert.assertEquals(img, t1.getImage());

    }
View Full Code Here

        if (altThumbs == null)
        {
            altThumbs = createArrayProperty(THUMBNAILS, Cardinality.Alt);
            addProperty(altThumbs);
        }
        ThumbnailType thumb = new ThumbnailType(getMetadata());
        thumb.setHeight(height);
        thumb.setWidth(width);
        thumb.setFormat(format);
        thumb.setImage(img);
        altThumbs.getContainer().addProperty(thumb);
    }
View Full Code Here

TOP

Related Classes of org.apache.xmpbox.type.ThumbnailType

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.