You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
916 B
41 lines
916 B
4 years ago
|
package com.fr.plugin.dingding.webhook.format;
|
||
|
|
||
|
import com.fr.io.exporter.ImageExporter;
|
||
|
import com.fr.main.workbook.ResultWorkBook;
|
||
|
import com.fr.schedule.extension.report.job.output.BaseOutputFormat;
|
||
|
|
||
|
import java.io.OutputStream;
|
||
|
import java.util.List;
|
||
|
|
||
|
/**
|
||
|
* @Author fr.open
|
||
|
* @Date 2020/9/15
|
||
|
* @Description
|
||
|
**/
|
||
|
public class PNGOutputFormat extends BaseOutputFormat {
|
||
|
public static final int CONVERT_TO_PNG = 64;
|
||
|
|
||
|
public PNGOutputFormat() {
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int getFormat() {
|
||
|
return CONVERT_TO_PNG;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getFileSuffix() {
|
||
|
return ".png";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean withParentPath() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void flushWithParentPath(OutputStream var1, ResultWorkBook var2, String var3, final List<String> var4) throws Exception {
|
||
|
new ImageExporter("png", 96).export(var1, var2);
|
||
|
}
|
||
|
}
|