Class EmfDecoder

  • All Implemented Interfaces:
    com.idrsolutions.image.Decoder

    public class EmfDecoder
    extends com.idrsolutions.image.JDeliImage
    implements com.idrsolutions.image.Decoder
    • Constructor Summary

      Constructors 
      Constructor Description
      EmfDecoder()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCommand​(int command)  
      java.awt.image.BufferedImage read​(byte[] data)
      Decodes and returns the WMF image as a BufferedImage from bytes
      java.awt.image.BufferedImage read​(java.io.File file)
      Decodes and returns the WMF file as a BufferedImage from a file
      static void toSVG​(java.io.File emfFile, java.io.File svgOutputFile)  
      static void toSVG​(java.io.InputStream emfInputStream, java.io.OutputStream svgOutputFile)  
      • Methods inherited from class com.idrsolutions.image.JDeliImage

        optimiseImage
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.idrsolutions.image.Decoder

        getImageCount, readImageAt, setMetadata
    • Constructor Detail

      • EmfDecoder

        public EmfDecoder()
    • Method Detail

      • getCommand

        public static java.lang.String getCommand​(int command)
      • read

        public java.awt.image.BufferedImage read​(java.io.File file)
                                          throws java.io.IOException
        Decodes and returns the WMF file as a BufferedImage from a file
        Specified by:
        read in interface com.idrsolutions.image.Decoder
        Parameters:
        file - input image file to be decoded
        Returns:
        BufferedImage decoded image
        Throws:
        java.io.IOException
      • read

        public java.awt.image.BufferedImage read​(byte[] data)
                                          throws java.io.IOException
        Decodes and returns the WMF image as a BufferedImage from bytes
        Specified by:
        read in interface com.idrsolutions.image.Decoder
        Parameters:
        data - byte[] containing the WMF data to be decoded
        Returns:
        BufferedImage The decoded image
        Throws:
        java.io.IOException
      • toSVG

        public static void toSVG​(java.io.File emfFile,
                                 java.io.File svgOutputFile)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • toSVG

        public static void toSVG​(java.io.InputStream emfInputStream,
                                 java.io.OutputStream svgOutputFile)
                          throws java.io.IOException
        Throws:
        java.io.IOException