Class WmfDecoder

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

    public class WmfDecoder
    extends com.idrsolutions.image.JDeliImage
    implements com.idrsolutions.image.Decoder
    Class reads lossy WMF images as BufferedImage // Make NO assumptions about type of BufferedImage type returned (may change)

    Example:

    
     WmfDecoder decoder = new WmfDecoder();
     BufferedImage decodedImage = decoder.read(wmfByteData);
     
    • Constructor Detail

      • WmfDecoder

        public WmfDecoder()
    • Method Detail

      • read

        public BufferedImage read​(File file)
                           throws IOException
        Decodes and returns the WMF file as a BufferedImage from a file
        Parameters:
        file - input image file to be decoded
        Returns:
        BufferedImage decoded image
        Throws:
        IOException
      • read

        public BufferedImage read​(byte[] data)
                           throws 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:
        IOException