com.uwyn.rife.cmf.loader.image
Class JMagickLoader

java.lang.Object
  extended by com.uwyn.rife.cmf.loader.ImageContentLoaderBackend
      extended by com.uwyn.rife.cmf.loader.image.JMagickLoader
All Implemented Interfaces:
ContentLoaderBackend<Image>

public class JMagickLoader
extends ImageContentLoaderBackend

This is an image loader back-end that uses JMagick to load image files, if its classes are present in the classpath.

More information about JMagick can be obtained from http://www.yeo.id.au/jmagick.

Since:
1.0
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Constructor Summary
JMagickLoader()
           
 
Method Summary
 boolean isBackendPresent()
          Indicates whether the back-end is present.
 Image loadFromBytes(byte[] data, Set<String> errors)
          Loads the data from a byte array.
 
Methods inherited from class com.uwyn.rife.cmf.loader.ImageContentLoaderBackend
load
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMagickLoader

public JMagickLoader()
Method Detail

loadFromBytes

public Image loadFromBytes(byte[] data,
                           Set<String> errors)
                    throws ContentManagerException
Description copied from class: ImageContentLoaderBackend
Loads the data from a byte array.

Specified by:
loadFromBytes in class ImageContentLoaderBackend
Parameters:
data - the raw data that has to be loaded
errors - a set to which possible error messages will be added
Returns:
an instance of the Image; or

null if the raw data couldn't be loaded

Throws:
ContentManagerException

isBackendPresent

public boolean isBackendPresent()
Description copied from interface: ContentLoaderBackend
Indicates whether the back-end is present.

This can be important for optional libraries that should only actually try to load the data when the required classes are available in the classpath.

Returns:
true if the back-end is present; or

false if this is not the case



Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.