001 /*
002 * Apache License
003 * Version 2.0, January 2004
004 * http://www.apache.org/licenses/
005 *
006 * Copyright 2008 by chenillekit.org
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 */
014
015 package org.chenillekit.tapestry.core.services;
016
017 import org.apache.tapestry5.Asset;
018
019 /**
020 * @version $Id: ThumbNailService.java 594 2009-12-05 15:17:26Z mlusetti $
021 */
022 public interface ThumbNailService
023 {
024 /**
025 * converts the original image <em>originalAsset</em> to a thumbnail.
026 *
027 * @param originalAsset the original image
028 * @param height scale down to <em>height</em>
029 * @param quality reduce to the given image quality
030 *
031 * @return the thumbnail of the original image
032 */
033 public Asset convertToThumbnail(Asset originalAsset, int height, float quality);
034
035 /**
036 * get the path where generated thumbnail should stored.
037 *
038 * @return thumbnail path
039 */
040 String getThumbnailPath();
041 }