com.groupdocs.viewer.handlers
Class ImageHandler

java.lang.Object
  extended by com.groupdocs.viewer.handlers.ImageHandler

public class ImageHandler
extends Object

Provides some image manipulation functionality

Author:
Alex Bobkov

Constructor Summary
ImageHandler()
           
 
Method Summary
static void addCaption(String imagePath)
          Add caption
static void addWatermark(String imagePath, String watermarkText, String color)
          Add watermark
static void resize(String imagePath, int width)
          Resize image with desired width
On resize image ration is kept
static void resize(String originalImagePath, String newImagePath, int width)
          Resize image with desired width and store it in new location
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageHandler

public ImageHandler()
Method Detail

resize

public static void resize(String imagePath,
                          int width)
                   throws Exception
Resize image with desired width
On resize image ration is kept

Parameters:
imagePath - Path to image file
width - New width
Throws:
Exception

resize

public static void resize(String originalImagePath,
                          String newImagePath,
                          int width)
                   throws Exception
Resize image with desired width and store it in new location

Parameters:
originalImagePath - Path to original image
newImagePath - Path to new image location
width - New width
Throws:
Exception

addWatermark

public static void addWatermark(String imagePath,
                                String watermarkText,
                                String color)
Add watermark

Parameters:
imagePath -
watermarkText -
color -

addCaption

public static void addCaption(String imagePath)
Add caption

Parameters:
imagePath -


Copyright © 2014. All rights reserved.