Exemple #1
0
 /**
  * @static
  * @throws Exception
  * @return null|Pimcore_Image_Adapter
  */
 public static function getImageTransformInstance()
 {
     try {
         $image = Pimcore_Image::getInstance();
     } catch (Exception $e) {
         $image = null;
     }
     if (!$image instanceof Pimcore_Image_Adapter) {
         throw new Exception("Couldn't get instance of image tranform processor.");
     }
     return $image;
 }
 public function thumbnailAdapterCheckAction()
 {
     $instance = Pimcore_Image::getInstance();
     if ($instance instanceof Pimcore_Image_Adapter_GD) {
         echo '<span style="color: red; font-weight: bold;padding: 10px;margin:0 0 20px 0;border:1px solid red;display:block;">' . $this->view->translate("important_use_imagick_pecl_extensions_for_best_results_gd_is_just_a_fallback_with_less_quality") . '</span>';
     }
     exit;
 }