Package com.xmlmind.w2x.docx.image

## Class ExternalImageConverter

- java.lang.Object
- - com.xmlmind.w2x.docx.image.ExternalImageConverter

- All Implemented Interfaces:
    `ImageConverterFactory`

      public final class ExternalImageConverter
      extends Object
      implements ImageConverterFactory

  Image converter factory executing an external program to perform the conversion.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `conversionCommand` |
    `String[]` | `supportedConversions` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ExternalImageConverter​(String[] conversions, String command)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ImageConverter` | `createImageConverter​(String inExt, String outExt)` | Returns a image converter allowing to convert an image file having first specified filename extension to an image file having second specified filename extension.
    `String[]` | `getImageConversions()` | Returns an array containing pairs of strings specifying the image conversions supported by converters created by this factory.
    `String` | `getParameter​(String name)` | Returns the value of specified parameter.
    `void` | `setParameter​(String name, String value)` | Sets specified parameter.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### supportedConversions

          public final String[] supportedConversions

    - #### conversionCommand

          public final String conversionCommand

  - ### Constructor Detail

    - #### ExternalImageConverter

          public ExternalImageConverter​(String[] conversions,
                                        String command)
                                 throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

  - ### Method Detail

    - #### setParameter

          public void setParameter​(String name,
                                   String value)

      Description copied from interface: `ImageConverterFactory`
      Sets specified parameter.
      Specified by:
        `setParameter` in interface `ImageConverterFactory`
      Parameters:
        `name` - name of parameter
        `value` - value of parameter; use `null` to unset it
      See Also:
        `ImageConverterFactory.getParameter(java.lang.String)`

    - #### getParameter

          public String getParameter​(String name)

      Description copied from interface: `ImageConverterFactory`
      Returns the value of specified parameter.
      Specified by:
        `getParameter` in interface `ImageConverterFactory`
      Parameters:
        `name` - name of parameter
      Returns:
        value of the parameter if set; `null` otherwise
      See Also:
        `ImageConverterFactory.setParameter(java.lang.String, java.lang.String)`

    - #### getImageConversions

          public String[] getImageConversions()

      Description copied from interface: `ImageConverterFactory`
      Returns an array containing pairs of strings specifying the image conversions supported by converters created by this factory.

      First element of the pair is an input file extension in lower-case. Examples: `wmf`, `emf`, `tif`, `tiff`.

      Second element of the pair is an output file extension in lower-case. Examples: `svg`, `png`, `jpg`, `jpeg`.

      Specified by:
        `getImageConversions` in interface `ImageConverterFactory`

    - #### createImageConverter

          public ImageConverter createImageConverter​(String inExt,
                                                     String outExt)

      Description copied from interface: `ImageConverterFactory`
      Returns a image converter allowing to convert an image file having first specified filename extension to an image file having second specified filename extension.
      Specified by:
        `createImageConverter` in interface `ImageConverterFactory`
      Parameters:
        `inExt` - the input filename extension
        `outExt` - the output filename extension