_loadLayouts(); } /** * Grid only ajax action */ public function stickergridonlyAction() { $this->_loadLayouts(); } public function previewAction() { @$image = base64_decode(urldecode($this->getRequest()->getParam('image'))); if (empty($image)) { $this->getResponse() ->setBody('Wrong image passed to preview') ->sendResponse(); exit; } $scale = $this->getRequest()->getParam('scale'); $position = $this->getRequest()->getParam('position'); $sample = Mage::getBaseDir('media') . DS . $this->_getHelper()->getPreviewSample(); $model = new Lanot_EasySticker_Model_Product_Image(); $model->setBaseFile($sample); $model->setStickerWatermark($image, $position, null, null, null, $scale); $this->getResponse() ->setHeader('Content-type', 'image/jpeg') ->setBody($model->getImageProcessor()->display()) ->sendResponse(); exit; } }