Examples of ThumbnailDomain


Examples of de.sosd.mediaserver.domain.db.ThumbnailDomain

        if (thumbnailFile.exists()) {
          // replace it
          FileUtils.forceDelete(thumbnailFile);
        }             
//            ThumbnailDomain thumb = resizeImageTo(160f, type, thumbnailFile, screenshot);
        final ThumbnailDomain thumb = moveImageTo(type, thumbnailFile, screenshot);
        logger.info("update add thumb for [" + dd.getId() + "]");
        dd.setThumbnail(thumb);
        dd.increaseUpdateId();
        dd.setGenerateThumbnail(false);
        this.fsDao.store(fd)
View Full Code Here

Examples of de.sosd.mediaserver.domain.db.ThumbnailDomain

  private ThumbnailDomain moveImageTo(final String type, final File thumbnailFile,
      final File screenshot) throws IOException {
    final BufferedImage originalImage = ImageIO.read(screenshot);
    screenshot.renameTo(thumbnailFile);
    return new ThumbnailDomain(type,originalImage.getWidth()+ "x" + originalImage.getHeight());
  }
View Full Code Here

Examples of de.sosd.mediaserver.domain.db.ThumbnailDomain

 
  private final static Log logger = LogFactory.getLog(ThumbnailPurger.class);
 
  @PostRemove
  public void onDelete(final DidlDomain domain) {
    final ThumbnailDomain thumbnail = domain.getThumbnail();
    if (thumbnail != null) {
      final File previews = new File(this.cfg.getPreviews());
      final File file = new File(previews, domain.getId() + "." + thumbnail.getType());
     
      if (file.exists()) {
        try {
          FileUtils.forceDelete(file);
        } catch (final IOException e) {
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.