public function generateThumbnail($masterFile, $targetFile)
 {
     $size = $this->currentDimension;
     require_once AJXP_INSTALL_PATH . "/plugins/editor.diaporama/PThumb.lib.php";
     $pThumb = new PThumb($this->getFilteredOption("THUMBNAIL_QUALITY"), $this->getFilteredOption("EXIF_ROTATION"));
     if (!$pThumb->isError()) {
         $pThumb->remote_wrapper = "AJXP_MetaStreamWrapper";
         //$this->logDebug("Will fit thumbnail");
         $sizes = $pThumb->fit_thumbnail($masterFile, $size, -1, 1, true);
         //$this->logDebug("Will print thumbnail");
         $pThumb->print_thumbnail($masterFile, $sizes[0], $sizes[1], false, false, $targetFile);
         //$this->logDebug("Done");
         if ($pThumb->isError()) {
             print_r($pThumb->error_array);
             $this->logError("ImagePreviewer", $pThumb->error_array);
             return false;
         }
     } else {
         print_r($pThumb->error_array);
         $this->logError("ImagePreviewer", $pThumb->error_array);
         return false;
     }
 }
 public function generateThumbnail($masterFile, $targetFile)
 {
     $size = $this->currentDimension;
     require_once AJXP_INSTALL_PATH . "/plugins/editor.diaporama/PThumb.lib.php";
     $pThumb = new PThumb($this->pluginConf["THUMBNAIL_QUALITY"]);
     if (!$pThumb->isError()) {
         $pThumb->remote_wrapper = $this->streamData["classname"];
         $sizes = $pThumb->fit_thumbnail($masterFile, $size, -1, 1, true);
         $pThumb->print_thumbnail($masterFile, $sizes[0], $sizes[1], false, false, $targetFile);
         if ($pThumb->isError()) {
             print_r($pThumb->error_array);
             AJXP_Logger::logAction("error", $pThumb->error_array);
             return false;
         }
     } else {
         print_r($pThumb->error_array);
         AJXP_Logger::logAction("error", $pThumb->error_array);
         return false;
     }
 }