return thumbnail for current size.

@return TCMSImage
324396
public function GetImageThumbnailObject($aEffects = array())
    {
        $oImageSize = &$this->GetImageSizeObject();
        $oImage = &$this->GetImageObject();
        $oThumb = null;
        TdbCmsConfigImagemagick::SetEnableEffects(true);
        $bEnableEffects = TdbCmsConfigImagemagick::GetEnableEffects();

        if ($oImageSize->fieldForceSize) {
            $oThumb = $oImage->GetForcedSizeThumbnail($oImageSize->fieldWidth, $oImageSize->fieldHeight);
        } else {
            $oThumb = $oImage->GetThumbnail($oImageSize->fieldWidth, $oImageSize->fieldHeight, true, $aEffects);
        }
        TdbCmsConfigImagemagick::SetEnableEffects($bEnableEffects);

        return $oThumb;
    }
408211
protected function getResize()
    {
        $resize = false;
        $imagePath = $this->getImagePath();
        if ($imagePath) {
            $imageSize = $this->getImageSize($imagePath);

            if ($imageSize['width'] > $this->getWidth() ||
                $imageSize['height'] > $this->getHeight()
            ) {
                $resize = true;
            }
        }

        return $resize;
    }
2003
private function getImageRtfHeight()
    {
        if ($this->_height > 0) {
            return PHPRtfLite_Unit::getUnitInTwips($this->_height);
        }

        $imageHeight = $this->_imageHeight ? $this->_imageHeight : 100;
        if ($this->_width > 0) {
            $imageWidth = $this->_imageWidth ? $this->_imageWidth : 100;
            $height = ($imageHeight /$imageWidth) * $this->_width;
            return PHPRtfLite_Unit::getUnitInTwips($height);
        }

        return PHPRtfLite_Unit::getPointsInTwips($imageHeight);
    }
267711
public function thumbnail($size = 'full')
    {
        $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($this->id()), $size);
        return isset($thumb[0]) ? $thumb[0] : '';
    }
1007113
public function getBannerImageSizes()
    {
        $sizes = array();
        $imageSize = $this->Database
                            ->prepare("SELECT id, name, width, height FROM tl_image_size ORDER BY pid, name")
                            ->execute(\Input::get('id'));
        while ($imageSize->next())
        {
            $sizes[$imageSize->id] = $imageSize->name;
            $sizes[$imageSize->id] .= ' (' . $imageSize->width . 'x' . $imageSize->height . ')';
        }
        return array_merge(array('image_sizes'=>$sizes), $GLOBALS['TL_CROP']);
    }
1315879
public int getImageSize() {
		int filePages = (int) header.get(FILE_PAGES);
		int lastPageSize = (int) header.get(LAST_PAGE_SIZE);

		int imageSize = (filePages - 1) * PAGE_SIZE + lastPageSize;
		if (lastPageSize == 0) {
			imageSize += PAGE_SIZE;
		}
		return imageSize;
	}
1366103
public function onGetSidebarThumbnail()
    {
        $path = Input::get('path');
        $lastModified = Input::get('lastModified');

        $thumbnailParams = $this->getThumbnailParams();
        $thumbnailParams['width'] = 300;
        $thumbnailParams['height'] = 255;
        $thumbnailParams['mode'] = 'auto';

        $path = MediaLibrary::validatePath($path);

        if (!is_numeric($lastModified)) {
            throw new ApplicationException('Invalid input data');
        }

        /*
         * If the thumbnail file exists, just return the thumbnail markup,
         * otherwise generate a new thumbnail.
         */
        $thumbnailPath = $this->thumbnailExists($thumbnailParams, $path, $lastModified);
        if ($thumbnailPath) {
            return [
                'markup' => $this->makePartial('thumbnail-image', [
                    'isError' => $this->thumbnailIsError($thumbnailPath),
                    'imageUrl' => $this->getThumbnailImageUrl($thumbnailPath)
                ])
            ];
        }

        $thumbnailInfo = $thumbnailParams;
        $thumbnailInfo['path'] = $path;
        $thumbnailInfo['lastModified'] = $lastModified;
        $thumbnailInfo['id'] = 'sidebar-thumbnail';

        return $this->generateThumbnail($thumbnailInfo, $thumbnailParams, true);
    }
185461
public function getImageDetails() {
		//set default return
		$return = ['width' => 0, 'height' => 0, 'size' => 0];
		//set media path
		$sMediaPath = \Yii::$app->imagemanager->mediaPath;
		$sFileExtension = pathinfo($this->fileName, PATHINFO_EXTENSION);
		//get image file path
		$sImageFilePath = $sMediaPath . '/' . $this->id . '_' . $this->fileHash . '.' . $sFileExtension;
		//check file exists
		if (file_exists($sImageFilePath)) {
			$aImageDimension = getimagesize($sImageFilePath);
			$return['width'] = isset($aImageDimension[0]) ? $aImageDimension[0] : 0;
			$return['height'] = isset($aImageDimension[1]) ? $aImageDimension[1] : 0;
			$return['size'] = Yii::$app->formatter->asShortSize(filesize($sImageFilePath), 2);
		}
		return $return;
	}
1172822
public function getImageDimensions()
    {
        $dimension = $this->getData()->chained->getComponent()->_getSetting('dimension');
        if ($this->getData()->chained->getComponent()->getRow()->use_crop) {
            $parentDimensions = $this->_getImageEnlargeComponent()->getImageDimensions();
            $dimension['crop'] = $parentDimensions['crop'];
        }
        $data = $this->getImageData();
        return Kwf_Media_Image::calculateScaleDimensions($data['file'], $dimension);
    }
274700
public function get_thumbnail()
	{
		if (!isset($this->data['thumbnail']))
		{
			if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail'))
			{
				$this->data['thumbnail'] = $return[0]['attribs'][''];
			}
			else
			{
				$this->data['thumbnail'] = null;
			}
		}
		return $this->data['thumbnail'];
	}
950900
public function thumbnailUrl() : string
    {
        return ($this->info()->threadThumbnailDetail->status == 2) ? 
        "" : 
        $this->info()->threadThumbnailDetail->resourcePath;
    }
147724
public function img()
    {
        // Check for an existing Image relation
        if (($image = $this->parentImg($this->inputName()))
            && $image->exists) {

            // If the Image represents a default image, but doesn't match the current
            // item from the config, trash the current one and build the new default
            // image.
            if ($replacement = $this->getReplacementImage($image)) {
                return $replacement;
            }

            // Return the found image
            return $image;
        }

        // Else return a default image
        return $this->defaultImage();
    }
511954
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;
            }
        );
    }
1135766
public function src()
    {
        $src = $this->thumbnail();

        if (!$src) {
            $src = $this->file();
        }

        return $this->createAbsoluteUrl($src);
    }
961782
public function generate()
    {
        $return = '';

        if (empty($this->thumbnailSize)) {
            $this->thumbnailSize = [
                Config::get('imageWidth'),
                Config::get('imageHeight'),
                'box',
            ];
        }

        $file = FilesModel::findByPk($this->varValue);
        if (null === $file && null !== $this->fallbackImage) {
            $file = FilesModel::findByPk($this->fallbackImage);
        }
        if (null !== $file) {
            $altTag = $file->name;
            $size   = deserialize($this->thumbnailSize);
            $image  = Image::create($file->path, $size)->executeResize();

            $return .= sprintf(
                '<img src="%s" width="%s" height="%s" alt="%s" class="uploaded-image">',
                $image->getResizedPath(),
                $image->getTargetWidth(),
                $image->getTargetHeight(),
                $altTag
            );
        }

        if ($this->addMetaWizard) {
//@todo add meta wizard here
        }

        $return .= parent::generate();

        if ($this->enableReset) {
            $return .= sprintf(
                '<input type="checkbox" name="%s" class="checkbox" value=""><label>%s</label> ',
                $this->strName.'_reset',
                'Reset'
            );
        }

        return $return;
    }
480636
protected function getImageInstance()
    {
        //Tries to create the image instance
        try {
            $imageInstance = $this->ImageManager->make($this->path);
        } catch (NotReadableException $e) {
            $message = __d('thumber', 'Unable to read image from file `{0}`', rtr($this->path));

            if ($e->getMessage() == 'Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files.') {
                $message = __d('thumber', 'Image type `{0}` is not supported by this driver', mime_content_type($this->path));
            }

            throw new RuntimeException($message);
        }

        return $imageInstance;
    }
1229198
function getSize()
    {
        $size = $this->_t__wrap_stream->getSize();
        if ($size !== null) {
            $segmentSize = $size - $this->getSegmentOffset();
            $size = ($this->getSegmentLimit() == -1)
                ? $segmentSize
                : min($segmentSize - $this->getSegmentLimit(), $this->getSegmentLimit());
        }

        return $size;
    }