Package com.google.gwt.gears.client.desktop

Examples of com.google.gwt.gears.client.desktop.BlobMetaData


    Factory factory = Factory.getInstance();
    Canvas canvas = factory.createCanvas();
    Desktop desktop = factory.createDesktop();

    Blob blob = canvas.encode();
    BlobMetaData metaData = desktop.extractMetaData(blob);
    assertEquals("image/png", metaData.getMimeType());
    assertEquals(canvas.getWidth(), metaData.getImageWidth());
    assertEquals(canvas.getHeight(), metaData.getImageHeight());

    blob = canvas.encode("image/png");
    metaData = desktop.extractMetaData(blob);
    assertEquals("image/png", metaData.getMimeType());
    assertEquals(canvas.getWidth(), metaData.getImageWidth());
    assertEquals(canvas.getHeight(), metaData.getImageHeight());

    blob = canvas.encode("image/jpeg");
    metaData = desktop.extractMetaData(blob);
    assertEquals("image/jpeg", metaData.getMimeType());
    assertEquals(canvas.getWidth(), metaData.getImageWidth());
    assertEquals(canvas.getHeight(), metaData.getImageHeight());

    try {
      canvas.encode("image/gif");
      fail();
    } catch (JavaScriptException jse) {
View Full Code Here

TOP

Related Classes of com.google.gwt.gears.client.desktop.BlobMetaData

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.