* @param vo ImageActionVO instance
* @return DecorativeImage instance
*/
public static DecorativeImage decorateImage(ImageActionVO vo){
//construct DecorativeImage instance according to requirement
DecorativeImage image = new BaseDecorativeImage();
//apply resize
if(vo.getParams().isApplyResize()){
image = new ResizeImage(image);
}
//apply corner round
if(vo.getParams().isApplyRound()){
image = new RoundCornerImage(image);
}
//apply text watermark
if(vo.getParams().isApplyWatermarkText()){
image = new WatermarkImage(image);
}
//apply exif append
if(vo.getParams().isApplyExif()){
image = new CameraInfoImage(image);
}
//execute decorative action
image.decorate(vo);
return image;
}