|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object magoffin.matt.ma2.support.AbstractMediaHandler magoffin.matt.ma2.image.BaseImageMediaHandler magoffin.matt.ma2.image.jmagick.BaseJMagickMediaHandler magoffin.matt.ma2.image.jmagick.JpegMediaHandler magoffin.matt.ma2.image.jmagick.PngMediaHandler
public class PngMediaHandler
PNG media handler using JMagick.
This handler returns JPEG images unless the original image is requested, in which case the original PNG image is returned.
Field Summary |
---|
Fields inherited from class magoffin.matt.ma2.image.jmagick.BaseJMagickMediaHandler |
---|
DEFAULT_OUTPUT_DEPTH |
Fields inherited from class magoffin.matt.ma2.image.BaseImageMediaHandler |
---|
DEFAULT_ORIENTATION_180_VALUE, DEFAULT_ORIENTATION_90_CLOCKWISE_VALUE, DEFAULT_ORIENTATION_90_COUNTER_CLOCKWISE_VALUE, DEFAULT_ORIENTATION_METADATA_KEY, ROTATE_180, ROTATE_90_CCW, ROTATE_90_CW |
Fields inherited from class magoffin.matt.ma2.support.AbstractMediaHandler |
---|
log, METADATA_PARAMETER_KEY |
Constructor Summary | |
---|---|
PngMediaHandler()
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getDelegateFileExtension(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request)
Get the preferred file extension for this handler. |
java.lang.String |
getFileExtension(MediaItem item,
MediaRequest request)
Get the file extension. |
Methods inherited from class magoffin.matt.ma2.image.jmagick.JpegMediaHandler |
---|
getJpeg2000UserAgentPatterns, getResponseMime, handleDelegateMediaRequest, isUseJpeg2000, setJpeg2000UserAgentPatterns, setJpeg2000UserAgentRegExp, setUseJpeg2000 |
Methods inherited from class magoffin.matt.ma2.image.jmagick.BaseJMagickMediaHandler |
---|
createNewMediaItem, defaultHandleRequest, defaultHandleResource, getEffect, getJmagickMediaEffectMap, getOutputDepth, handleMediaRequest, setJmagickMediaEffectMap, setOutputDepth, setupBaseItemProperties |
Methods inherited from class magoffin.matt.ma2.image.BaseImageMediaHandler |
---|
getOrientation180Value, getOrientation90ClockwiseValue, getOrientation90CounterClockwiseValue, getOrientationMetadataKey, handleMetadata, needToRotate, setOrientation180Value, setOrientation90ClockwiseValue, setOrientation90CounterClockwiseValue, setOrientationMetadataKey |
Methods inherited from class magoffin.matt.ma2.support.AbstractMediaHandler |
---|
applyEffects, createMetadataList, defaultHandleRequestOriginal, getDomainObjectFactory, getMediaBiz, getMediaMetadataInstance, getMime, getNoWatermarkSizes, getPreferredFileExtension, getRequestEffects, getSmetaPropertyMap, getUserBiz, needToAlter, setDomainObjectFactory, setMediaBiz, setMime, setNoWatermarkSizes, setPreferredFileExtension, setSmetaPropertyMap, setUserBiz |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PngMediaHandler()
Method Detail |
---|
public java.lang.String getFileExtension(MediaItem item, MediaRequest request)
AbstractMediaHandler
This method simply returns AbstractMediaHandler.getPreferredFileExtension()
.
Extending class may override this for request-specific handling.
getFileExtension
in interface MediaHandler
getFileExtension
in class JpegMediaHandler
item
- the media item to processrequest
- the request
public java.lang.String getDelegateFileExtension(org.springframework.core.io.Resource mediaResource, java.lang.String mimeType, MediaItem item, MediaRequest request)
MediaHandlerDelegate
The mediaResource
is not the original MediaItem
resource, rather it is the media resource extracted from
the MediaItem, e.g. the metadata resource.
Some handlers might return a different file extension for a given request then the default file extension for their type (for example a PNG image handler that returns JPEG images when resizing the images.
getDelegateFileExtension
in interface MediaHandlerDelegate
getDelegateFileExtension
in class JpegMediaHandler
mediaResource
- the media data to processmimeType
- the MIME type of the media data in mediaResource
item
- the MediaItem being processedrequest
- the request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |