protected function getImageArray($tag, $block, array $attr_template = null)
 {
     switch ($tag) {
         case ImageExtObject::TAG_IMAGEEXT:
         case ImageExtObject::TAG_IMAGE:
             $image = new ImageExtImage($this->imageExt);
             $image->parse($tag, $block, $attr_template);
             $image->parseFileAttributes();
             return $image->toArray();
             break;
     }
     return null;
 }
 public static function getTumb($page, $attr = array())
 {
     if (!is_array($attr) && count($attr) == 0) {
         return "";
     }
     $imageExt = new ImageExt($page);
     $imageExtImage = new ImageExtImage($imageExt);
     $imageExtImage->parse(ImageExtImage::TAG_IMAGE, array(), $attr);
     $imageExtImage->parseFileAttributes();
     $imageExtImage->optimizeOutput();
     if ($imageExt->isDebug()) {
         return $imageExtImage->getDebug();
     } else {
         $imageExtImage->generate();
         return $imageExtImage->toHTML();
     }
 }