Permlink Replies: 1 - Pages: 1 - Last Post: 16-Sep-2005 09:58 Last Post By: davidekholm

Posts: 1
Registered: 9-Nov-2004
animated gif in slide.htt
Posted: 16-Sep-2005 01:07
  Click to reply to this thread Reply
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.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


Posts: 3,455
Registered: 18-Oct-2002
Re: animated gif in slide.htt
Posted: 16-Sep-2005 09:58   in response to: kurt-2001 in response to: kurt-2001
  Click to reply to this thread Reply
Thanks for that one.
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums