Implementation of ALF-5066. Support for thumbnailing of .eps files.

Had to relax AbstractImageMagickContentTransformerWorker's restriction to 'image/*' mimetypes to allow 'application/eps'.
  Added application/eps to the MimetypeMap.
  Added application/eps to the view and edit modes of the mimetype.ftl forms control.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22838 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2010-10-04 10:50:15 +00:00
parent b482ea50f8
commit ffdef0597c
3 changed files with 9 additions and 1 deletions

View File

@@ -137,7 +137,13 @@ public abstract class AbstractImageMagickContentTransformerWorker extends Conten
*/
public static boolean isSupported(String mimetype)
{
if (!mimetype.startsWith(MIMETYPE_IMAGE_PREFIX))
// ImageMagick supports the transformation of Encapsulated PostScript images,
// whose MIME type is defined in mimetype-map.xml as "application/eps".
if (mimetype.equals(MimetypeMap.MIMETYPE_APPLICATION_EPS))
{
return true; // This is an image although it doesn't start with "image/"
}
else if (!mimetype.startsWith(MIMETYPE_IMAGE_PREFIX))
{
return false; // not an image
}

View File

@@ -60,6 +60,7 @@ public class ImageMagickContentTransformerWorker extends AbstractImageMagickCont
*/
public ImageMagickContentTransformerWorker()
{
// Intentionally empty
}
/**
@@ -142,6 +143,7 @@ public class ImageMagickContentTransformerWorker extends AbstractImageMagickCont
/**
* Transform the image content from the source file to the target file
*/
@Override
protected void transformInternal(File sourceFile, File targetFile, TransformationOptions options) throws Exception
{
Map<String, String> properties = new HashMap<String, String>(5);