Class ComponentImage.EncodedWrapper
- All Implemented Interfaces:
ActionSource
- Enclosing class:
ComponentImage
-
Method Summary
Modifier and TypeMethodDescriptionprotected ImageReturns the actual image represented by the encoded image, this image will be cached in a weak/soft reference internally.scaled(int width, int height) Returns a scaled version of this image image using the given width and height, this is a fast algorithm that preserves translucent information.scaledEncoded(int width, int height) Performs scaling using ImageIO to generate an encoded ImageMethods inherited from class EncodedImage
asyncLock, create, create, create, create, create, createFromImage, createFromRGB, createMulti, drawImage, drawImage, getGraphics, getHeight, getImage, getImageData, getWidth, isAnimation, isLocked, isOpaque, lock, modifyAlpha, modifyAlpha, resetCache, rotate, scale, scaledHeight, scaledSmallerRatio, scaledWidth, subImage, toRGB, unlockMethods inherited from class Image
addActionListener, animate, applyMask, applyMask, applyMaskAutoScale, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, dispose, exifRotation, exifRotation, exifRotation, fill, fireChangedEvent, flipHorizontally, flipVertically, getExifOrientationTag, getExifOrientationTag, getImageName, getRGB, getRGB, getRGBCached, getSVGDocument, isAlphaMutableImageSupported, isJPEG, isPNG, isSVG, isSVGSupported, mirror, modifyAlphaWithTranslucency, removeActionListener, requiresDrawImage, rotate180Degrees, rotate270Degrees, rotate90Degrees, scaledLargerRatio, setImageName
-
Method Details
-
scaledEncoded
Performs scaling using ImageIO to generate an encoded Image
Parameters
-
width: the width of the image, -1 to scale based on height and preserve aspect ratio -
height: the height of the image, -1 to scale based on width and preserve aspect ratio
Returns
new encoded image
- Overrides:
scaledEncodedin classEncodedImage
-
-
scaled
Returns a scaled version of this image image using the given width and height, this is a fast algorithm that preserves translucent information. The method accepts -1 to preserve aspect ratio in the given axis.
Parameters
-
width: width for the scaling -
height: height of the scaled image
Returns
new image instance scaled to the given height and width
- Overrides:
scaledin classEncodedImage
-
-
getInternal
Returns the actual image represented by the encoded image, this image will be cached in a weak/soft reference internally. This method is useful to detect when the system actually created an image instance. You shouldn't invoke this method manually!
Returns
drawable image instance
- Overrides:
getInternalin classEncodedImage
-