public interface ImagingService
Modifier and Type | Method and Description |
---|---|
PictureView |
computeViewFor(Blob blob,
PictureConversion pictureConversion,
boolean convert)
|
PictureView |
computeViewFor(Blob blob,
PictureConversion pictureConversion,
ImageInfo imageInfo,
boolean convert)
|
List<PictureView> |
computeViewsFor(Blob blob,
List<PictureConversion> pictureConversions,
boolean convert)
|
List<PictureView> |
computeViewsFor(Blob blob,
List<PictureConversion> pictureConversions,
ImageInfo imageInfo,
boolean convert)
|
List<PictureView> |
computeViewsFor(DocumentModel doc,
Blob blob,
ImageInfo imageInfo,
boolean convert)
Compute all the registered
PictureConversion For each picture template the
computeViewFor(Blob, PictureConversion, ImageInfo, boolean) method is call |
List<List<PictureView>> |
computeViewsFor(List<Blob> blobs,
List<PictureConversion> pictureConversions,
boolean convert)
|
List<List<PictureView>> |
computeViewsFor(List<Blob> blobs,
List<PictureConversion> pictureConversions,
ImageInfo imageInfo,
boolean convert)
|
Blob |
crop(Blob blob,
int x,
int y,
int width,
int height)
Crops an image.
|
String |
getConfigurationValue(String configurationName)
Returns the value a configuration which name is received as parameter.
|
String |
getConfigurationValue(String configurationName,
String defaultValue)
Returns the value a configuration which name is received as parameter.
|
ImageInfo |
getImageInfo(Blob blob)
|
Map<String,Object> |
getImageMetadata(Blob blob)
Deprecated.
since 7.2. Please use instead
BinaryMetadataService.readMetadata(Blob) |
String |
getImageMimeType(Blob blob)
Returns the mime-type for the given Blob
|
String |
getImageMimeType(File file)
Returns the mime-type for the given file.
|
PictureConversion |
getPictureConversion(String id)
Returns a
PictureConversion given its id . |
List<PictureConversion> |
getPictureConversions()
Returns the registered picture conversions.
|
Blob |
resize(Blob blob,
String finalFormat,
int width,
int height,
int depth)
Resizes image.
|
Blob |
rotate(Blob blob,
int angle)
Rotates an image.
|
void |
setConfigurationValue(String configurationName,
String configurationValue)
Sets the value of a configuration which could be used by the ImagingService.
|
List<PictureConversion> getPictureConversions()
PictureConversion getPictureConversion(String id)
PictureConversion
given its id
.Blob rotate(Blob blob, int angle)
blob
- a Blob containing the imageangle
- the angle of the rotationMap<String,Object> getImageMetadata(Blob blob)
BinaryMetadataService.readMetadata(Blob)
Blob
.String getImageMimeType(Blob blob)
ImageInfo getImageInfo(Blob blob)
ImageInfo
of the Blob
that is received as parameter.
The information provided by the ImageInfo, like width, height or format, is obtained using ImageMagick (see http://www.imagemagick.org/script/index.php for more details on ImageMagick).
blob
- the blob of a pictureImageInfo
of a blobString getConfigurationValue(String configurationName)
configurationName
- the name of the configurationString getConfigurationValue(String configurationName, String defaultValue)
configurationName
- the name of the configurationdefaultValue
- the value of the configurationvoid setConfigurationValue(String configurationName, String configurationValue)
configurationName
- the name of the configurationconfigurationValue
- the value of the configurationPictureView computeViewFor(Blob blob, PictureConversion pictureConversion, boolean convert) throws IOException, ClientException
convert
- true if the blob
is converted to fit the pictureConversion
, false if the
blob
is put as it in the PictureView (without any conversion)IOException
ClientException
PictureView computeViewFor(Blob blob, PictureConversion pictureConversion, ImageInfo imageInfo, boolean convert) throws IOException, ClientException
imageInfo
- the ImageInfo
to use when computing the viewconvert
- true if the blob
is converted to fit the pictureConversion
, false if the
blob
is put as it in the PictureView (without any conversion)IOException
ClientException
List<PictureView> computeViewsFor(Blob blob, List<PictureConversion> pictureConversions, boolean convert) throws IOException, ClientException
convert
- true if the blob
is converted to fit each PictureConversion
, false if the
blob
is put as it in the PictureView (without any conversion)PictureView
sIOException
ClientException
List<PictureView> computeViewsFor(Blob blob, List<PictureConversion> pictureConversions, ImageInfo imageInfo, boolean convert) throws IOException, ClientException
imageInfo
- the ImageInfo
to use when computing the viewconvert
- true if the blob
is converted to fit each PictureConversion
, false if the
blob
is put as it in the PictureView (without any conversion)PictureView
sIOException
ClientException
List<List<PictureView>> computeViewsFor(List<Blob> blobs, List<PictureConversion> pictureConversions, boolean convert) throws IOException, ClientException
convert
- true if the blob
is converted to fit each PictureConversion
, false if the
blob
is put as it in the PictureView (without any conversion)IOException
ClientException
List<List<PictureView>> computeViewsFor(List<Blob> blobs, List<PictureConversion> pictureConversions, ImageInfo imageInfo, boolean convert) throws IOException, ClientException
imageInfo
- the ImageInfo
to use when computing the viewconvert
- true if the blob
is converted to fit each PictureConversion
, false if the
blob
is put as it in the PictureView (without any conversion)IOException
ClientException
List<PictureView> computeViewsFor(DocumentModel doc, Blob blob, ImageInfo imageInfo, boolean convert) throws ClientException, IOException
PictureConversion
For each picture template the
computeViewFor(Blob, PictureConversion, ImageInfo, boolean)
method is callClientException
IOException
Copyright © 2015 Nuxeo SA. All rights reserved.