| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final Logger | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Dimension | Returns: the dimensions in EMUsthe picture containing the anchor picture)Calculates the dimensions in EMUs for the anchor of the given picture |
| private static int | getDimFromCell(double imgSize, int startCell, int startD, int endCell, int endD, int hssfUnits, Function<Integer, Number> nextSize)
|
| public static Dimension | Returns: image dimension in pixelsthe stream containing the image data is, int type of the picture: type)Workbook#PICTURE_TYPE_JPEG,
Workbook#PICTURE_TYPE_PNG or Workbook#PICTURE_TYPE_DIBReturn the dimension of this image |
| public static int[] | Returns: array of two elements:{horizontalDpi, verticalDpi}.
{96, 96} is the default.The metadata of PNG and JPEG can contain the width of a pixel in millimeters. |
| public static double | |
| private static void | |
| public static Dimension | Returns: the new Dimensions of the scaled picture in EMUsthe amount by which image width is multiplied relative to the original width. scaleX, double the amount by which image height is multiplied relative to the original height. scaleY)Calculate and set the preferred size (anchor) for this picture. |
| HEIGHT_UNITS | back to summary |
|---|---|
| private static final int HEIGHT_UNITS | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| WIDTH_UNITS | back to summary |
|---|---|
| private static final int WIDTH_UNITS | |
| ImageUtils | back to summary |
|---|---|
| private ImageUtils() | |
| getDimensionFromAnchor | back to summary |
|---|---|
| public static Dimension getDimensionFromAnchor(Picture picture) Calculates the dimensions in EMUs for the anchor of the given picture | |
| getDimFromCell | back to summary |
|---|---|
| private static int getDimFromCell(double imgSize, int startCell, int startD, int endCell, int endD, int hssfUnits, Function<Integer, Number> nextSize) | |
| getImageDimension | back to summary |
|---|---|
| public static Dimension getImageDimension(InputStream is, int type) Return the dimension of this image
| |
| getResolution | back to summary |
|---|---|
| public static int[] getResolution(ImageReader r) throws IOException The metadata of PNG and JPEG can contain the width of a pixel in millimeters.
Return the "effective" dpi calculated as
| |
| getRowHeightInPixels | back to summary |
|---|---|
| public static double getRowHeightInPixels(Sheet sheet, int rowNum) | |
| scaleCell | back to summary |
|---|---|
| private static void scaleCell(final double targetSize, final int startCell, final int startD, Consumer<Integer> endCell, Consumer<Integer> endD, final int hssfUnits, Function<Integer, Number> nextSize) | |
| setPreferredSize | back to summary |
|---|---|
| public static Dimension setPreferredSize(Picture picture, double scaleX, double scaleY) Calculate and set the preferred size (anchor) for this picture.
| |