package be.nikiroo.fanfix.library;
-import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import be.nikiroo.fanfix.output.BasicOutput;
import be.nikiroo.fanfix.output.BasicOutput.OutputType;
import be.nikiroo.fanfix.supported.BasicSupport;
-import be.nikiroo.fanfix.supported.BasicSupport.SupportType;
+import be.nikiroo.fanfix.supported.SupportType;
+import be.nikiroo.utils.Image;
import be.nikiroo.utils.Progress;
/**
*
* @return the cover image
*/
- public abstract BufferedImage getCover(String luid);
+ public abstract Image getCover(String luid);
/**
* Return the cover image associated to this source.
*
* @return the cover image or NULL
*/
- public BufferedImage getSourceCover(String source) {
+ public Image getSourceCover(String source) {
List<MetaData> metas = getListBySource(source);
if (metas.size() > 0) {
return getCover(metas.get(0).getLuid());
.getType());
URL url = file.toURI().toURL();
if (type != null) {
- story = BasicSupport.getSupport(type).process(url,
- pgProcess);
+ story = BasicSupport.getSupport(type, url) //
+ .process(pgProcess);
// Because we do not want to clear the meta cache:
meta.setCover(story.getMeta().getCover());
story.setMeta(meta);
throw new UnknownHostException("" + url);
}
- return save(support.process(url, pg), null);
+ return save(support.process(pg), null);
}
/**