public class DefaultThumbnailService extends Object implements ThumbnailService
Service class for thumbnail previews.
Constructor and Description |
---|
DefaultThumbnailService(List<ThumbnailPreview> thumbnailPreviews) |
Modifier and Type | Method and Description |
---|---|
Thumbnail |
generateThumbnail(org.springframework.core.io.Resource resource,
com.google.common.net.MediaType mediaType,
int thumbnailMaxHeight,
PreviewType previewType,
Instant lastModifiedDate)
Generates a thumbnail for the given input stream and
PreviewType . |
public DefaultThumbnailService(List<ThumbnailPreview> thumbnailPreviews)
public Thumbnail generateThumbnail(org.springframework.core.io.Resource resource, com.google.common.net.MediaType mediaType, int thumbnailMaxHeight, PreviewType previewType, Instant lastModifiedDate)
ThumbnailService
Generates a thumbnail for the given input stream and PreviewType
.
generateThumbnail
in interface ThumbnailService
resource
- the input stream for which the thumbnail is generatedmediaType
- the media type of the filethumbnailMaxHeight
- the maximum height of the thumbnail. Use 0 if the image should be returned in the original sizepreviewType
- the preview type for which the thumbnail is generatedlastModifiedDate
- the last modified date.Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.