Examples of ImageMetadata


Examples of org.apache.sanselan.common.ImageMetadata

                true);

        if ((chunks == null) || (chunks.size() < 1))
            return null;

        ImageMetadata result = new ImageMetadata();

        for (int i = 0; i < chunks.size(); i++)
        {
            PNGTextChunk chunk = (PNGTextChunk) chunks.get(i);

            result.add(chunk.getKeyword(), chunk.getText());
        }

        return result;
    }
View Full Code Here

Examples of org.broadleafcommerce.openadmin.server.service.artifact.image.ImageMetadata

        if (count > 0) {
            fullUrl = getCountUrl(fullUrl, count, false);
        }

        try {
            ImageMetadata metadata = imageArtifactProcessor.getImageMetadata(file.getInputStream());
            newAsset = new ImageStaticAssetImpl();
            ((ImageStaticAsset) newAsset).setWidth(metadata.getWidth());
            ((ImageStaticAsset) newAsset).setHeight(metadata.getHeight());
        } catch (Exception e) {
            //must not be an image stream
            newAsset = new StaticAssetImpl();
        }
        if (storeAssetsOnFileSystem) {
View Full Code Here

Examples of org.waveprotocol.box.attachment.ImageMetadata

      image = ImageIO.read(data.getInputStream());
    } catch (IOException ex) {
      LOG.log(Level.SEVERE, "Identifying attachment", ex);
    }
    if (image != null) {
      ImageMetadata imageMetadata = new ImageMetadataImpl();
      imageMetadata.setWidth(image.getWidth());
      imageMetadata.setHeight(image.getHeight());
      metadata.setImageMetadata(imageMetadata);
      try {
        BufferedImage thumbnail = makeThumbnail(image);
        storeThumbnail(attachmentId, thumbnail);
        ImageMetadata thumbnailMetadata = new ImageMetadataImpl();
        thumbnailMetadata.setWidth(thumbnail.getWidth());
        thumbnailMetadata.setHeight(thumbnail.getHeight());
        metadata.setThumbnailMetadata(thumbnailMetadata);
      } catch (IOException ex) {
        LOG.log(Level.SEVERE, "Building attachment thumbnail", ex);
      }
    } else {
      ImageMetadata thumbnailMetadata = new ImageMetadataImpl();
      thumbnailMetadata.setWidth(THUMBNAIL_PATTERN_WIDTH);
      thumbnailMetadata.setHeight(THUMBNAIL_PATTERN_HEIGHT);
      metadata.setThumbnailMetadata(thumbnailMetadata);
    }
    store.storeMetadata(attachmentId, metadata);
    return metadata;
  }
View Full Code Here

Examples of org.waveprotocol.wave.media.model.Attachment.ImageMetadata

   * Checks the values on the thumbnail and image metadata fields.
   *
   * @param wrapper the wrapper
   */
  private static void checkElementFields(MutableClientAttachment wrapper) {
    ImageMetadata attachmentImage = wrapper.getContentImageMetadata();
    assertEquals(IMAGE_HEIGHT, attachmentImage.getHeight());
    assertEquals(IMAGE_WIDTH, attachmentImage.getWidth());

    ImageMetadata attachmentThumbnail = wrapper.getThumbnailImageMetadata();
    assertEquals(THUMB_HEIGHT, attachmentThumbnail.getHeight());
    assertEquals(THUMB_WIDTH, attachmentThumbnail.getWidth());
  }
View Full Code Here

Examples of org.waveprotocol.wave.media.model.Attachment.ImageMetadata

    String url = c.getAttachmentUrl();
    if (url != null) {
      renderer.getView(e).setAttachmentUrl(url);
    }

    ImageMetadata metadata = c.getContentImageMetadata();
    if (metadata != null) {
      renderer.getView(e).setAttachmentSize(metadata.getWidth(), metadata.getHeight());
    }
  }
View Full Code Here

Examples of org.waveprotocol.wave.media.model.Attachment.ImageMetadata

    String url = c.getThumbnailUrl();
    if (url != null) {
      renderer.getView(e).setThumbnailUrl(url);
    }

    ImageMetadata metadata = c.getThumbnailImageMetadata();
    if (metadata != null) {
      renderer.getView(e).setThumbnailSize(metadata.getWidth(), metadata.getHeight());
    }

    if (metadata == null && c.getStatus() == Status.FAILED_AND_NOT_RETRYABLE) {
      renderer.getView(e).displayDeadImage(
          attachmentLoadingFailedTooltip);
View Full Code Here

Examples of org.waveprotocol.wave.media.model.AttachmentV3.ImageMetadata

    String url = c.getAttachmentUrl();
    if (url != null) {
      renderer.getView(e).setAttachmentUrl(url);
    }

    ImageMetadata metadata = c.getContentImageMetadata();
    if (metadata != null) {
      renderer.getView(e).setAttachmentSize(metadata.getWidth(), metadata.getHeight());
    }
  }
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.