Package ru.org.linux.util.image

Examples of ru.org.linux.util.image.ImageInfo


      );
    }

    if (user.getPhoto() != null) {
      try {
        ImageInfo info = new ImageInfo(siteConfig.getHTMLPathPrefix() + "/photos/" + user.getPhoto());

        return new Userpic(
            "/photos/" + user.getPhoto(),
            info.getWidth(),
            info.getHeight()
        );
      } catch (FileNotFoundException e) {
        logger.warn("Userpic not found for {}: {}", user.getNick(), e.getMessage());
      } catch (BadImageException | IOException e) {
        logger.warn("Bad userpic for {}", user.getNick(), e);
View Full Code Here


    ImmutableList.Builder<PreparedGalleryItem> builder = ImmutableList.builder();

    for (GalleryItem item : items) {
      try {
        ImageInfo iconInfo = new ImageInfo(htmlPath + item.getImage().getIcon());
        ImageInfo fullInfo = new ImageInfo(htmlPath + item.getImage().getOriginal());

        builder.add(new PreparedGalleryItem(
                item,
                userDao.getUserCached(item.getUserid()),
                iconInfo, fullInfo));
View Full Code Here

    params.put("group", group);

    if(group.getImage() != null) {
      try {
        params.put("groupImagePath", '/' + "tango" + group.getImage());
        ImageInfo info = new ImageInfo(siteConfig.getHTMLPathPrefix() + "tango" + group.getImage());
        params.put("groupImageInfo", info);
      } catch (BadImageException ex) {
        params.put("groupImagePath", null);
        params.put("groupImageInfo", null);
      }
View Full Code Here

    if (!new File(htmlPath, mediumName).exists()) {
      mediumName = image.getIcon();
    }

    try {
      ImageInfo mediumImageInfo = new ImageInfo(htmlPath + mediumName);
      ImageInfo fullInfo = new ImageInfo(htmlPath + image.getOriginal());
      LorURL medURI = new LorURL(siteConfig.getMainURI(), siteConfig.getMainUrl()+mediumName);
      LorURL fullURI = new LorURL(siteConfig.getMainURI(), siteConfig.getMainUrl()+image.getOriginal());

      return new PreparedImage(medURI.fixScheme(secure), mediumImageInfo, fullURI.fixScheme(secure), fullInfo, image);
    } catch (BadImageException e) {
View Full Code Here

TOP

Related Classes of ru.org.linux.util.image.ImageInfo

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.