Class HSSFPicture


public class HSSFPicture extends HSSFSimpleShape
Represents a escher picture. Eg. A GIF, JPEG etc...
Author:
Glen Stampoultzis, Yegor Kozlov (yegor at apache.org)
  • Field Details

  • Method Details

    • getPictureIndex

      public int getPictureIndex()
    • setPictureIndex

      public void setPictureIndex(int pictureIndex)
    • resize

      public void resize()
      Reset the image to the original size.
      Since:
      POI 3.0.2
    • getPreferredSize

      public HSSFClientAnchor getPreferredSize()
      Calculate the preferred size for this picture.
      Returns:
      HSSFClientAnchor with the preferred size for this image
      Since:
      POI 3.0.2
    • getResolution

      protected int[] getResolution(ImageReader r) throws IOException
      The metadata of PNG and JPEG can contain the width of a pixel in millimeters. Return the the "effective" dpi calculated as 25.4/HorizontalPixelSize and 25.4/VerticalPixelSize. Where 25.4 is the number of mm in inch.
      Returns:
      array of two elements: {horisontalPdi, verticalDpi}. {96, 96} is the default.
      Throws:
      IOException