public void generateImage(CachedFile imageFile,CachedFile coverFile){
  assert imageFile != null;
  assert coverFile != null && coverFile.exists();
  logger.debug("generateImage: " + imageFile.getAbsolutePath());
  long now=System.currentTimeMillis();
  try {
    ImageFile ct=new ImageFile(coverFile.getAbsolutePath());
    if (!ct.isImageLoaded())     return;
    ct.getImage(imageHeight,ImageFile.VERTICAL);
    ct.saveImage(imageFile,ImageFile.IMAGE_JPEG);
    CachedFile cf=CachedFileManager.addCachedFile(imageFile);
    if (logger.isTraceEnabled())     logger.trace("generateImages: added new thumbnail file " + imageFile.getAbsolutePath() + " to list of files to copy");
    countOfImagesGenerated++;
  }
 catch (  Exception e) {
    CatalogManager.callback.errorOccured(Localization.Main.getText("error.generatingImage",imageFile.getAbsolutePath()),e);
    if (logger.isTraceEnabled())     logger.trace(e);
  }
catch (  Throwable t) {
    logger.warn("Unexpected error trying to generate image " + coverFile.getAbsolutePath() + "\n"+ t);
  }
  timeInImages+=(System.currentTimeMillis() - now);
  imageFile.clearCachedInformation();
}

public void generateImage ( CachedFile imageFile , CachedFile coverFile ) { assert imageFile != null ; assert coverFile != null && coverFile . exists ( ) ; logger . debug ( "generateImage: " + imageFile . getAbsolutePath ( ) ) ; long now = System . currentTimeMillis ( ) ; try { ImageFile ct = new ImageFile ( coverFile . getAbsolutePath ( ) ) ; if ( ! ct . isImageLoaded ( ) ) return ; ct . getImage ( imageHeight , ImageFile . VERTICAL ) ; ct . saveImage ( imageFile , ImageFile . IMAGE_JPEG ) ; CachedFile cf = CachedFileManager . addCachedFile ( imageFile ) ; if ( logger . isTraceEnabled ( ) ) logger . trace ( "generateImages: added new thumbnail file " + imageFile . getAbsolutePath ( ) + " to list of files to copy" ) ; countOfImagesGenerated ++ ; } catch ( Exception e ) { CatalogManager . callback . errorOccured ( Localization . Main . getText ( "error.generatingImage" , imageFile . getAbsolutePath ( ) ) , e ) ; if ( logger . isTraceEnabled ( ) ) logger . trace ( e ) ; } catch ( Throwable t ) { logger . warn ( "Unexpected error trying to generate image " + coverFile . getAbsolutePath ( ) + "\n" + t ) ; } timeInImages += ( System . currentTimeMillis ( ) - now ) ; imageFile . clearCachedInformation ( ) ; }
* generate a single image file
