1 17 package org.alfresco.repo.content.transform.magick; 18 19 import java.io.File ; 20 import java.util.Map ; 21 22 import magick.ImageInfo; 23 import magick.MagickImage; 24 25 import org.apache.commons.logging.Log; 26 import org.apache.commons.logging.LogFactory; 27 28 34 public class JMagickContentTransformer extends AbstractImageMagickContentTransformer 35 { 36 private static final Log logger = LogFactory.getLog(JMagickContentTransformer.class); 37 38 public JMagickContentTransformer() 39 { 40 } 41 42 49 @Override 50 protected void transformInternal(File sourceFile, File targetFile, Map <String , Object > options) throws Exception 51 { 52 ImageInfo imageInfo = new ImageInfo(sourceFile.getAbsolutePath()); 53 MagickImage image = new MagickImage(imageInfo); 54 image.setFileName(targetFile.getAbsolutePath()); 55 image.writeImage(imageInfo); 56 } 57 } 58 | Popular Tags |