com.liferay.portal.kernel.image
Class ImageMagickUtil

java.lang.Object
  extended by com.liferay.portal.kernel.image.ImageMagickUtil

public class ImageMagickUtil
extends java.lang.Object

The ImageMagick utility class.

Author:
Alexander Chow

Constructor Summary
ImageMagickUtil()
           
 
Method Summary
static java.util.concurrent.Future<?> convert(java.util.List<java.lang.String> arguments)
          Executes the convert command in ImageMagick.
static void destroy()
           
static java.lang.String getGlobalSearchPath()
          Returns the global search path configured for ImageMagick.
static ImageMagick getImageMagick()
           
static java.util.Properties getResourceLimitsProperties()
          Returns the cache and resource usage limits configured for ImageMagick.
static java.lang.String[] identify(java.util.List<java.lang.String> arguments)
          Executes the identify command in ImageMagick.
static boolean isEnabled()
          Returns true if ImageMagick is enabled.
static void reset()
          Resets the global search path and resource limits for ImageMagick.
 void setImageMagick(ImageMagick imageMagick)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageMagickUtil

public ImageMagickUtil()
Method Detail

convert

public static java.util.concurrent.Future<?> convert(java.util.List<java.lang.String> arguments)
                                              throws java.lang.Exception
Executes the convert command in ImageMagick.

Parameters:
arguments - the command arguments being passed to convert
Returns:
the converted command arguments
Throws:
java.lang.Exception - if an unexpected error occurred while executing command
See Also:
Convert documentation

destroy

public static void destroy()

getGlobalSearchPath

public static java.lang.String getGlobalSearchPath()
                                            throws java.lang.Exception
Returns the global search path configured for ImageMagick.

Returns:
the global search path
Throws:
java.lang.Exception - if an unexpected error occurred

getImageMagick

public static ImageMagick getImageMagick()

getResourceLimitsProperties

public static java.util.Properties getResourceLimitsProperties()
                                                        throws java.lang.Exception
Returns the cache and resource usage limits configured for ImageMagick.

Returns:
the cache and resource usage limits
Throws:
java.lang.Exception - if an unexpected error occurred

identify

public static java.lang.String[] identify(java.util.List<java.lang.String> arguments)
                                   throws java.lang.Exception
Executes the identify command in ImageMagick.

Parameters:
arguments - the command arguments being passed to identify
Returns:
the results of the identify call
Throws:
java.lang.Exception - if an unexpected error occurred while executing command
See Also:
Identify documentation

isEnabled

public static boolean isEnabled()
Returns true if ImageMagick is enabled.

Returns:
true if ImageMagick is enabled; false otherwise

reset

public static void reset()
Resets the global search path and resource limits for ImageMagick.


setImageMagick

public void setImageMagick(ImageMagick imageMagick)