org.apache.poi.hemf.record.emfplus

## Class HemfPlusGDIImageRenderer

- java.lang.Object
- - org.apache.poi.sl.draw.BitmapImageRenderer
  - - org.apache.poi.hemf.record.emfplus.HemfPlusGDIImageRenderer

- All Implemented Interfaces:
    ImageRenderer

      public class HemfPlusGDIImageRenderer
      extends BitmapImageRenderer

- - ### Field Summary

    - ### Fields inherited from class org.apache.poi.sl.draw.BitmapImageRenderer

      `img`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HemfPlusGDIImageRenderer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canRender(java.lang.String contentType)` Determines if this image renderer implementation supports the given contentType
    `int` | `getHeight()`
    `HemfPlusImage.EmfPlusPixelFormat` | `getPixelFormat()`
    `int` | `getStride()`
    `int` | `getWidth()`
    `void` | `loadImage(byte[] data, java.lang.String contentType)` Load and buffer the image
    `void` | `loadImage(java.io.InputStream data, java.lang.String contentType)` Load and buffer the image
    `java.awt.image.BufferedImage` | `readGDIImage(byte[] data)` Converts the gdi pixel data to a buffered image
    `void` | `setHeight(int height)`
    `void` | `setPixelFormat(HemfPlusImage.EmfPlusPixelFormat pixelFormat)`
    `void` | `setStride(int stride)`
    `void` | `setWidth(int width)`

    - ### Methods inherited from class org.apache.poi.sl.draw.BitmapImageRenderer

      `drawImage, drawImage, getBounds, getImage, getImage, getNativeBounds, setAlpha, setAlpha`

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

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

    - ### Methods inherited from interface org.apache.poi.sl.draw.ImageRenderer

      `getDimension, getGenericRecord`

- - ### Constructor Detail

    - #### HemfPlusGDIImageRenderer

          public HemfPlusGDIImageRenderer()

  - ### Method Detail

    - #### getWidth

          public int getWidth()

    - #### setWidth

          public void setWidth(int width)

    - #### getHeight

          public int getHeight()

    - #### setHeight

          public void setHeight(int height)

    - #### getStride

          public int getStride()

    - #### setStride

          public void setStride(int stride)

    - #### getPixelFormat

          public HemfPlusImage.EmfPlusPixelFormat getPixelFormat()

    - #### setPixelFormat

          public void setPixelFormat(HemfPlusImage.EmfPlusPixelFormat pixelFormat)

    - #### canRender

          public boolean canRender(java.lang.String contentType)

      Description copied from interface: `ImageRenderer`
      Determines if this image renderer implementation supports the given contentType
      Specified by:
        `canRender` in interface `ImageRenderer`
      Overrides:
        `canRender` in class `BitmapImageRenderer`
      Parameters:
        `contentType` - the image content type
      Returns:
        if the content type is supported

    - #### loadImage

          public void loadImage(java.io.InputStream data,
                                java.lang.String contentType)
                         throws java.io.IOException

      Description copied from interface: `ImageRenderer`
      Load and buffer the image
      Specified by:
        `loadImage` in interface `ImageRenderer`
      Overrides:
        `loadImage` in class `BitmapImageRenderer`
      Parameters:
        `data` - the raw image stream
        `contentType` - the content type
      Throws:
        `java.io.IOException`

    - #### loadImage

          public void loadImage(byte[] data,
                                java.lang.String contentType)
                         throws java.io.IOException

      Description copied from interface: `ImageRenderer`
      Load and buffer the image
      Specified by:
        `loadImage` in interface `ImageRenderer`
      Overrides:
        `loadImage` in class `BitmapImageRenderer`
      Parameters:
        `data` - the raw image bytes
        `contentType` - the content type
      Throws:
        `java.io.IOException`

    - #### readGDIImage

          public java.awt.image.BufferedImage readGDIImage(byte[] data)

      Converts the gdi pixel data to a buffered image
      Parameters:
        `data` - the image data of all EmfPlusImage parts
      Returns:
        the BufferedImage

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.