Swat/SwatImagePreviewDisplay.php
protected function isPreviewDisplayable()
    {
        $image_area = $this->width * $this->height;
        $preview_area = $this->preview_width * $this->preview_height;

        $difference = ($preview_area - $image_area) / $image_area;

        return $this->preview_image != '' &&
            ($this->show_preview_when_smaller || $difference >= 0.2);
    }
protected function isPreviewDisplayable()
    {
        $image_area = $this->width * $this->height;
        $preview_area = $this->preview_width * $this->preview_height;

        $difference = ($preview_area - $image_area) / $image_area;

        return $this->preview_image != '' &&
            ($this->show_preview_when_smaller || $difference >= 0.2);
    }
protected function isPreviewDisplayable ( ) { $ image_area = $ this -> width * $ this -> height ; $ preview_area = $ this -> preview_width * $ this -> preview_height ; $ difference = ( $ preview_area - $ image_area ) / $ image_area ; return $ this -> preview_image != '' && ( $ this -> show_preview_when_smaller || $ difference >= 0.2 ) ; }
Checks whether the preview exists, and whether it should be displayed.

@return boolean True if the preview should be displayed, false if it
should not.
Checks whether the preview exists and whether it should be displayed .