| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract static class | |
| pack-priv static class | ImageUtil.
AWT-style one-step scaling, using area averaging |
| pack-priv static class | ImageUtil.
Fast but decent scaling |
| pack-priv static class | ImageUtil.
Step-wise downscaling |
| pack-priv static class | ImageUtil.
Old AWT-style scaling, poor quality |
| pack-priv static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static BufferedImage | Returns: BufferedImage with same content.image to convert; if already a BufferedImage, returned unmodified awtImg, int the type of BufferedImage to create; see
type)java.Utility method to convert an AWT Image to a BufferedImage. |
| public static BufferedImage | Returns: A BufferedImage compatible with the screen (best fit).Target width for the image width, int Target height for the image height, int Value from the biType)java. class; see docs for
java.. The actual type used will
be the type specified in this parameter, if in headless mode, or the type most compatible with the screen, if
in non-headless more.Helper method to instantiate new BufferedImages; if the graphics environment is actually connected to real screen devices (e.g. not in headless mode), the image will be compatible with the screen device allowing for best performance. |
| public static BufferedImage | |
| public static byte[] | |
| public static byte[] | Returns: The binary contentURI of the embedded image imageDataUri)Get the binary content of an embedded base 64 image. |
| private static GraphicsConfiguration | |
| public static BufferedImage | Returns: The scaled image instance.The image to scale orgImage)Scales an image to the requested width and height, assuming these are both >= 1; size given in pixels. |
| public static BufferedImage | Returns: The scaled image instance.The image to scale orgImage, int The target width in pixels targetWidth, int The target height in pixels targetHeight)Scales an image to the requested width and height, assuming these are both >= 1; size given in pixels. |
| public static BufferedImage |
| qual | back to summary |
|---|---|
| private static final Map<DownscaleQuality, ImageUtil. | |
| WHITE_SPACE | back to summary |
|---|---|
| private static final Pattern WHITE_SPACE | |
| ImageUtil | back to summary |
|---|---|
| public ImageUtil() | |
| convertToBufferedImage | back to summary |
|---|---|
| public static BufferedImage convertToBufferedImage(Image awtImg, int type) Utility method to convert an AWT Image to a BufferedImage. Size is preserved, BufferedImage is compatible with current display device.
| |
| createCompatibleBufferedImage | back to summary |
|---|---|
| public static BufferedImage createCompatibleBufferedImage(int width, int height, int biType) Helper method to instantiate new BufferedImages; if the graphics environment is actually connected to real
screen devices (e.g. not in headless mode), the image will be compatible with the screen device allowing
for best performance. In a headless environment, simply creates a new BufferedImage. For non-headless
environments, this just sets up and calls
| |
| createTransparentImage | back to summary |
|---|---|
| public static BufferedImage createTransparentImage(int width, int height) | |
| fromBase64Encoded | back to summary |
|---|---|
| public static byte[] fromBase64Encoded(String b64encoded) | |
| getEmbeddedBase64Image | back to summary |
|---|---|
| public static byte[] getEmbeddedBase64Image(String imageDataUri) Get the binary content of an embedded base 64 image.
| |
| getGraphicsConfiguration | back to summary |
|---|---|
| private static GraphicsConfiguration getGraphicsConfiguration() | |
| getScaledInstance | back to summary |
|---|---|
| public static BufferedImage getScaledInstance(ScalingOptions opt, BufferedImage orgImage) Scales an image to the requested width and height, assuming these are both >= 1; size given in pixels.
If either width or height is <=0, the current image width or height will be used. This method assumes
that, at the moment the method is called, the width and height of the image are available; it won't wait for
them. Therefore, the method should be called once the image has completely loaded and not before.
| |
| getScaledInstance | back to summary |
|---|---|
| public static BufferedImage getScaledInstance(BufferedImage orgImage, int targetWidth, int targetHeight) Scales an image to the requested width and height, assuming these are both >= 1; size given in pixels.
If either width or height is <=0, the current image width or height will be used. This method assumes y
that, at the moment the method is called, the width and height of the image are available; it won't wait for
them. Therefore, the method should be called once the image has completely loaded and not before.
| |
| makeCompatible | back to summary |
|---|---|
| public static BufferedImage makeCompatible(BufferedImage bimg) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract int | |
| public BufferedImage | getScaledInstance(BufferedImage
the original image to be scaled img, ScalingOptions options opt)Implements com. Convenience method that returns a scaled instance of the
provided |
| AbstractFastScaler | back to summary |
|---|---|
| pack-priv AbstractFastScaler() | |
| getImageScalingMethod | back to summary |
|---|---|
| protected abstract int getImageScalingMethod() | |
| getScaledInstance | back to summary |
|---|---|
| public BufferedImage getScaledInstance(BufferedImage img, ScalingOptions opt) Implements com. Doc from com. Convenience method that returns a scaled instance of the
provided
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected int |
| AreaAverageScaler | back to summary |
|---|---|
| pack-priv AreaAverageScaler() | |
| getImageScalingMethod | back to summary |
|---|---|
| protected int getImageScalingMethod() Implements abstract com. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public BufferedImage | getScaledInstance(BufferedImage
the original image to be scaled img, ScalingOptions options opt)Implements com. Convenience method that returns a scaled instance of the
provided |
| FastScaler | back to summary |
|---|---|
| pack-priv FastScaler() | |
| getScaledInstance | back to summary |
|---|---|
| public BufferedImage getScaledInstance(BufferedImage img, ScalingOptions opt) Implements com. Doc from com. Convenience method that returns a scaled instance of the
provided
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public BufferedImage | getScaledInstance(BufferedImage
the original image to be scaled img, ScalingOptions options opt)Implements com. Convenience method that returns a scaled instance of the
provided |
| HighQualityScaler | back to summary |
|---|---|
| pack-priv HighQualityScaler() | |
| getScaledInstance | back to summary |
|---|---|
| public BufferedImage getScaledInstance(BufferedImage img, ScalingOptions opt) Implements com. Doc from com. Convenience method that returns a scaled instance of the
provided
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected int |
| OldScaler | back to summary |
|---|---|
| pack-priv OldScaler() | |
| getImageScalingMethod | back to summary |
|---|---|
| protected int getImageScalingMethod() Implements abstract com. | |
| Modifier and Type | Method and Description |
|---|---|
| public BufferedImage | Returns: a scaled version of the originalBufferedImagethe original image to be scaled img, ScalingOptions options opt)Convenience method that returns a scaled instance of the
provided |
| getScaledInstance | back to summary |
|---|---|
| public BufferedImage getScaledInstance(BufferedImage img, ScalingOptions opt) Convenience method that returns a scaled instance of the
provided
| |