src/DeferedImageExtension.php
public function MicroImage()
    {
        $pixel = $this->config()->pixelate;
        $blur = $this->config()->blur;
        $quality = $this->config()->quality;
        $scale = $this->config()->scale;
        
        $variant = $this->owner->variantName(__FUNCTION__, $pixel, $blur, $quality, $scale);
        return $this->owner->manipulateImage(
            $variant, 
            function (Image_Backend $backend) use ($pixel, $blur, $quality, $scale) {
                $clone = clone $backend;
                $resource = clone $backend->getImageResource();
                $resource->pixelate($pixel)->blur($blur)->encode('jpg', $quality);
                if ($scale != 100) {
                    $width = $backend->getWidth() * ($scale/100);
                    $height = $backend->getHeight() * ($scale/100);
                    $resource->resize($width, $height);
                }
                $clone->setImageResource($resource);
                return $clone;
            }
        );
    }
public function MicroImage()
    {
        $pixel = $this->config()->pixelate;
        $blur = $this->config()->blur;
        $quality = $this->config()->quality;
        $scale = $this->config()->scale;
        
        $variant = $this->owner->variantName(__FUNCTION__, $pixel, $blur, $quality, $scale);
        return $this->owner->manipulateImage(
            $variant, 
            function (Image_Backend $backend) use ($pixel, $blur, $quality, $scale) {
                $clone = clone $backend;
                $resource = clone $backend->getImageResource();
                $resource->pixelate($pixel)->blur($blur)->encode('jpg', $quality);
                if ($scale != 100) {
                    $width = $backend->getWidth() * ($scale/100);
                    $height = $backend->getHeight() * ($scale/100);
                    $resource->resize($width, $height);
                }
                $clone->setImageResource($resource);
                return $clone;
            }
        );
    }
public function MicroImage ( ) { $ pixel = $ this -> config ( ) -> pixelate ; $ blur = $ this -> config ( ) -> blur ; $ quality = $ this -> config ( ) -> quality ; $ scale = $ this -> config ( ) -> scale ; $ variant = $ this -> owner -> variantName ( __FUNCTION__ , $ pixel , $ blur , $ quality , $ scale ) ; return $ this -> owner -> manipulateImage ( $ variant , function ( Image_Backend $ backend ) use ( $ pixel , $ blur , $ quality , $ scale ) { $ clone = clone $ backend ; $ resource = clone $ backend -> getImageResource ( ) ; $ resource -> pixelate ( $ pixel ) -> blur ( $ blur ) -> encode ( 'jpg' , $ quality ) ; if ( $ scale != 100 ) { $ width = $ backend -> getWidth ( ) * ( $ scale / 100 ) ; $ height = $ backend -> getHeight ( ) * ( $ scale / 100 ) ; $ resource -> resize ( $ width , $ height ) ; } $ clone -> setImageResource ( $ resource ) ; return $ clone ; } ) ; }
Generates a reduced quality version of the current image
@config
@return void
Generates a reduced quality version of the current image