in case of active picture is of GIF-type,
following little helper method copies the
original animated gif-file to the output-folder
and deletes the JAlbum-generated .jpg file
on exit of JAlbum:
String copyGif(boolean doOut) {
if (!"GIF".equalsIgnoreCase(formatName)) {
if(doOut) out.print(imagePath);
return imagePath;
}
File src = new File(imageDirectory, fileName);
File tdir = new File(outputDirectory, engine.getSlideDirectory());
File tar = new File(tdir, fileName);
if (!tar.exists())
IO.copyFile(src, tar);
tar = new File(tdir, imagePath);
if (tar.exists()) {
tar.delete();
}
tar.deleteOnExit(); // ensure jpg-file will be deleted
if(doOut) out.print(fileName);
return fileName;
}
here is the html-line which calls the above method:
<IMG SRC="<%copyGif(true)%>" WIDTH="$imageWidth" HEIGHT="$imageHeight">
hope you find it useful!
(tested with JAlbum 5.2.2)
Message was edited by: davidekholm