01-06-2010 07:16 PM
<image-transformers>
<transformer name="application/pdf"/>
</image-transformers>
01-07-2010 01:13 AM
/**
* Some image formats are not supported by ImageMagick, or at least appear not to work.
*
* @param mimetype the mimetype to check
* @return Returns true if ImageMagic can handle the given image format
*/
public static boolean isSupported(String mimetype)
{
if (!mimetype.startsWith(MIMETYPE_IMAGE_PREFIX))
{
return false; // not an image
}
else if (mimetype.equals(MimetypeMap.MIMETYPE_IMAGE_RGB))
{
return false; // rgb extension doesn't work
}
else if (mimetype.equals(MimetypeMap.MIMETYPE_IMAGE_SVG))
{
return false; // svg extension doesn't work
}
else
{
return true;
}
}
/**
* Supports image to image conversion, but only if the JMagick library and required
* libraries are available.
*/
public boolean isTransformable(String sourceMimetype, String targetMimetype, TransformationOptions options)
{
if (!available)
{
return false;
}
if (!AbstractImageMagickContentTransformerWorker.isSupported(sourceMimetype) ||
!AbstractImageMagickContentTransformerWorker.isSupported(targetMimetype))
{
// only support IMAGE -> IMAGE (excl. RGB)
return false;
}
else
{
return true;
}
}
01-07-2010 05:38 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.