import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
-import java.net.URL;
import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.bundles.StringId;
class Text extends BasicOutput {
protected BufferedWriter writer;
protected File targetDir;
+ private boolean nextParaIsCover = true;
@Override
public File process(Story story, File targetDir, String targetName)
protected void writeParagraphHeader(Paragraph para) throws IOException {
if (para.getType() == ParagraphType.IMAGE) {
File file = new File(targetDir, getCurrentImageBestName(true));
- Instance.getCache().saveAsImage(new URL(para.getContent()), file);
+ Instance.getCache().saveAsImage(para.getContentImage(), file,
+ nextParaIsCover);
}
+
+ nextParaIsCover = false;
}
@Override