ImageConverter
Inheritance: java.lang.Object
public class ImageConverter
Converter for converting template file to images.
Example
ImageConverter.process("template.xlsx", "res.png");
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getClass() | |
hashCode() | |
notify() | |
notifyAll() | |
process(LowCodeLoadOptions loadOptions, LowCodeSaveOptions saveOptions) | Converts template file to images |
process(LowCodeLoadOptions loadOptions, LowCodeSaveOptions saveOptions, AbstractLowCodeSaveOptionsProvider provider) | Converts template file to images |
process(String templateFile, String resultFile) | Converts template file to images. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
process(LowCodeLoadOptions loadOptions, LowCodeSaveOptions saveOptions)
public static void process(LowCodeLoadOptions loadOptions, LowCodeSaveOptions saveOptions)
Converts template file to images
Remarks
When converting to image of format that supports multiple pages(such as tiff), the specified LowCodeSaveOptions.getOutputFile() or LowCodeSaveOptions.getOutputStream() will be used directly for the resultant image.
For other types of image, if the save options has specified Stream as output, then all resultant images will be saved to the same Stream. Otherwise, the output files will be build from the specified output file of the save options by appending sequence number of the sheet and split part. For example, if the specified output file is Image.png, then the generated image files will be Image_0_0.png, Image_0_1.png, …, Image_1_0.png, …
Parameters:
Parameter | Type | Description |
---|---|---|
loadOptions | LowCodeLoadOptions | Options for input and loading |
saveOptions | LowCodeSaveOptions | Options for output and saving |
process(LowCodeLoadOptions loadOptions, LowCodeSaveOptions saveOptions, AbstractLowCodeSaveOptionsProvider provider)
public static void process(LowCodeLoadOptions loadOptions, LowCodeSaveOptions saveOptions, AbstractLowCodeSaveOptionsProvider provider)
Converts template file to images
Parameters:
Parameter | Type | Description |
---|---|---|
loadOptions | LowCodeLoadOptions | Options for input and loading |
saveOptions | LowCodeSaveOptions | Options for saving. Its output(LowCodeSaveOptions.getOutputFile() or LowCodeSaveOptions.getOutputStream()) takes no effect because all outputs will be specified by the “provider” parameter |
provider | AbstractLowCodeSaveOptionsProvider | Provider of save options for saving the generated images |
process(String templateFile, String resultFile)
public static void process(String templateFile, String resultFile)
Converts template file to images.
Remarks
The output files will be build from the specified result file by appending sequence number of the sheet and split part. For example, if the specified output file is Image.png, then the generated image files will be Image_0_0.png, Image_0_1.png, …, Image_1_0.png, …
Parameters:
Parameter | Type | Description |
---|---|---|
templateFile | java.lang.String | The template file to be converted to images. |
resultFile | java.lang.String | The resultant file(name pattern) for generated images. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |