public static class ImageInfo.Builder
extends java.lang.Object
ImageInfo builder for easier initialization.
extension, width and height must be set
96dpi will be assumed for resolution, but can be changed
Modifier and Type | Method and Description |
---|---|
ImageInfo |
build()
Create an ImageInfo object from the builder.
|
ImageInfo.Builder |
extension(java.lang.String extension)
Specifying image extension, eg: png, jpg,...
|
ImageInfo.Builder |
height(int height)
Specifying image height.
|
ImageInfo.Builder |
resolution(float resolution)
Image resolution (DPI).
|
ImageInfo.Builder |
width(int width)
Specifying image width.
|
public ImageInfo.Builder extension(java.lang.String extension)
Specifying image extension, eg: png, jpg,...
Must be set before call to build()
extension
- image extensionpublic ImageInfo.Builder width(int width)
Specifying image width. Width can't be negative.
Must be set before call to build()
width
- image widthpublic ImageInfo.Builder height(int height)
Specifying image height. Height can't be negative.
Must be set before call to build()
height
- image heightpublic ImageInfo.Builder resolution(float resolution)
Image resolution (DPI).
If different horizontal and vertical resolution must be used, full ImageInfo constructor must be used
resolution
- dpipublic ImageInfo build()