Class ImageServiceImpl
- java.lang.Object
-
- de.digitalcollections.iiif.hymir.image.business.ImageServiceImpl
-
- All Implemented Interfaces:
ImageService
@Service public class ImageServiceImpl extends Object implements ImageService
-
-
Constructor Summary
Constructors Constructor Description ImageServiceImpl(ImageSecurityService imageSecurityService, de.digitalcollections.commons.file.business.api.FileResourceService fileResourceService, ImageMetrics metrics)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancontainsAlphaChannel(BufferedImage image)StringgetAttribution()InstantgetImageModificationDate(String identifier)StringgetLicense()StringgetLogoUrl()intgetMaxHeight()intgetMaxWidth()voidprocessImage(String identifier, de.digitalcollections.iiif.model.image.ImageApiSelector selector, de.digitalcollections.iiif.model.image.ImageApiProfile profile, OutputStream os)voidreadImageInfo(String identifier, de.digitalcollections.iiif.model.image.ImageService info)voidsetAttribution(String attribution)voidsetLicense(String license)voidsetLogoUrl(String logoUrl)voidsetMaxHeight(int maxHeight)voidsetMaxWidth(int maxWidth)
-
-
-
Constructor Detail
-
ImageServiceImpl
public ImageServiceImpl(@Autowired(required=false) ImageSecurityService imageSecurityService, @Autowired de.digitalcollections.commons.file.business.api.FileResourceService fileResourceService, @Autowired ImageMetrics metrics)
-
-
Method Detail
-
containsAlphaChannel
public static boolean containsAlphaChannel(BufferedImage image)
- Parameters:
image- buffered image to check for alpha channel- Returns:
- true, if image contains alpha channel
- See Also:
- Javadoc ColorModel
-
readImageInfo
public void readImageInfo(String identifier, de.digitalcollections.iiif.model.image.ImageService info) throws UnsupportedFormatException, UnsupportedOperationException, de.digitalcollections.model.exception.ResourceNotFoundException, IOException
- Specified by:
readImageInfoin interfaceImageService- Throws:
UnsupportedFormatExceptionUnsupportedOperationExceptionde.digitalcollections.model.exception.ResourceNotFoundExceptionIOException
-
processImage
public void processImage(String identifier, de.digitalcollections.iiif.model.image.ImageApiSelector selector, de.digitalcollections.iiif.model.image.ImageApiProfile profile, OutputStream os) throws InvalidParametersException, UnsupportedOperationException, UnsupportedFormatException, de.digitalcollections.model.exception.ResourceNotFoundException, IOException, ScalingException
- Specified by:
processImagein interfaceImageService- Throws:
InvalidParametersExceptionUnsupportedOperationExceptionUnsupportedFormatExceptionde.digitalcollections.model.exception.ResourceNotFoundExceptionIOExceptionScalingException
-
getImageModificationDate
public Instant getImageModificationDate(String identifier) throws de.digitalcollections.model.exception.ResourceNotFoundException
- Specified by:
getImageModificationDatein interfaceImageService- Throws:
de.digitalcollections.model.exception.ResourceNotFoundException
-
getLogoUrl
public String getLogoUrl()
-
setLogoUrl
public void setLogoUrl(String logoUrl)
-
getAttribution
public String getAttribution()
-
setAttribution
public void setAttribution(String attribution)
-
getLicense
public String getLicense()
-
setLicense
public void setLicense(String license)
-
getMaxWidth
public int getMaxWidth()
-
setMaxWidth
public void setMaxWidth(int maxWidth)
-
getMaxHeight
public int getMaxHeight()
-
setMaxHeight
public void setMaxHeight(int maxHeight)
-
-