Ejemplo n.º 1
0
 /**
  * This will return the web/docroot-relative path for the dialog-box image for this showcase item image
  * NOTE: if the thumbnail does not exist, this will also CREATE the thumbnail
  * @return string
  */
 public function GetDialogBoxPath()
 {
     // calculate the web/docroot-relative path
     $strThumbPath = $this->GetDialogBoxFolder() . '/dbox-' . $this->intId . '.' . ImageFileType::$ExtensionArray[$this->intImageFileTypeId];
     // See if the thumbnail image, itself exists
     if (file_exists(__DOCROOT__ . $strThumbPath)) {
         return $strThumbPath;
     }
     // It does NOT exist -- we need to create it first
     QApplication::MakeDirectory(__DOCROOT__ . $this->GetThumbFolder(), 0777);
     $objImageControl = new QImageControl(null);
     $objImageControl->ImagePath = $this->GetImagePath();
     $objImageControl->Width = 300;
     $objImageControl->Height = 300;
     $objImageControl->ScaleCanvasDown = false;
     $objImageControl->ScaleImageUp = true;
     $objImageControl->RenderImage(__DOCROOT__ . $strThumbPath);
     return $strThumbPath;
 }