// =====================================================
  // setEXIFpictureMetadaten()
  //
  // Aus dem Image-Original werden die EXIF-Daten f�r die
  // PM_PictureMetadatenX geholt und eingetragen
  // =====================================================
  public static void setEXIFpictureMetadaten(PM_Picture picture) {

    PM_PictureImageMetadaten imageMetadaten = picture.getImageMetadaten();

    // ----------------------------------------------------
    // FujiFilm Makernote:  SequenceNummer --> virtPicture
    // ----------------------------------------------------

    // -------------------------------------------------------
    // Date
    // ------------------------------------------------------

    String tagDatum = "Date/Time Original";
    String description = "";
    if (imageMetadaten.hasTag(tagDatum)) {
      description = imageMetadaten.getDescription(tagDatum);
    }

    // ----------------------------------------------------
    // Datum nicht vorhanden oder ung�ltig
    // ----------------------------------------------------
    Date myDate = null;
    if (description.length() == 0 || description.equals("0000:00:00 00:00:00")) {
      //			  System.out.println("......  Datum = " + description + " kann nicht konvertiert
      // werden");
      File f = picture.getFileOriginal();
      Date date = new Date(f.lastModified());
      picture.meta.setDateImport(date);
      picture.meta.setDateCurrent(new Date(date.getTime()));
      return;
    }

    // ----------------------------------------------------
    // g�ltiges Datum gefunden
    // ----------------------------------------------------
    DateFormat df = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
    try {
      myDate = df.parse(description);
    } catch (ParseException e) {
      //           System.out.println("ParseException fuer Datum = " + description);
      myDate = new Date(System.currentTimeMillis()); // default
    }
    picture.meta.setDateImport(myDate);
    picture.meta.setDateCurrent(new Date(myDate.getTime()));
  }
  /** Read the original picture and scale down the thumb */
  private Image readThumb(PM_Picture picture, File fileThumbnail) {

    // Now make a thumb nail file and store it on the disk.
    // So you can read it in future from the disk.
    picture.readImageOriginal();
    Image imageOriginal = picture.getImageOriginal();
    Image imageThumbnail = makeThumbnail(imageOriginal);
    if (imageThumbnail == null) {
      return null;
    }
    PM_UtilsGrafik.writeThumbnail(fileThumbnail, imageThumbnail);

    setEXIFpictureMetadaten(picture);
    // add high and width from the image-original file.
    picture.meta.setImageSize(PM_UtilsGrafik.getImageSize(imageOriginal));
    PM_Picture.flushAllImagesOriginal();

    return imageThumbnail;
  }
 /**
  * Get a thumbnail.
  *
  * <p>If not available the image is created.
  */
 public synchronized Image getImage(PM_Picture picture, boolean toImport) {
   File fileOriginal = picture.getFileOriginal();
   File fileThumbnail = PM_Utils.getFileThumbnail(fileOriginal);
   // The thumbnail file is available.
   if (fileThumbnail.isFile()) {
     return readImageThumbnail(fileThumbnail);
   }
   // The thumb nail file is NOT available.
   if (toImport) {
     //			return readThumbAsIcon(picture, fileOriginal, fileThumbnail);
   }
   return readThumb(picture, fileThumbnail);
 };