Example usage for Java com.liferay.portal.kernel.image ImageToolUtil fields, constructors, methods, implement or subclass
The text is from its open source code.
RenderedImage | crop(RenderedImage renderedImage, int height, int width, int x, int y) |
byte[] | getBytes(RenderedImage renderedImage, String contentType) Returns the image as a byte[] . |
ImageBag | read(byte[] bytes) Detects the image format and creates an ImageBag containing the RenderedImage and image type. |
ImageBag | read(File file) Detects the image format and creates an ImageBag containing the RenderedImage and image type. |
ImageBag | read(InputStream inputStream) |
RenderedImage | scale(RenderedImage renderedImage, int maxHeight, int maxWidth) Returns the scaled image based on the maximum height and width given while preserving the aspect ratio. |
void | setImageTool(ImageTool imageTool) |
void | write(RenderedImage renderedImage, String contentType, OutputStream os) Encodes the image using the content or image type. |