Get image sizes

@return array
8557
protected function getImageSizes()
    {
        if (is_callable($this->_imageSizes)) {
            return call_user_func($this->_imageSizes, $this->owner);
        } else {
            return $this->_imageSizes;
        }
    }
234666
public function getCoverSizes()
    {
        $sizes = $this->getValue('sizes');

        if (empty($sizes)) {
            $sizes = $this->_sizes;
        }

        return $sizes;
    }
1090331
public function getImages()
    {
        $images = array();
        $image = $this->getImage();
        if (!empty($image)) {
            $images[$image] = $image;
        }

        $screenshotsPath = $this->getFilePath().self::SCREENSHOT_PATH;
        $files = array();
        if (is_dir($screenshotsPath)) {
            $files = scandir($screenshotsPath);
        }

        foreach ($files as $file) {
            $ext = pathinfo($file, PATHINFO_EXTENSION);
            if ($ext === 'gif' || $ext === 'jpg' || $ext === 'png') {
                $images['/theme/images/screenshots/'.$file] = '/theme/images/screenshots/'.$file;
            }
        }


        return $images;
    }
814637
public function toData()
    {
        $data = [
            'type' => 'standard',
        ];

        if ($this->imageSize) {
            $data['image_size'] = $this->imageSize;
        }

        if ($this->ref) {
            $data['data'] = $this->ref;
        }


        return $data;
    }
51132
public function getAvgRgb(): array
    {
        $resource = imagescale($this->resource, 1, 1);

        $rgba = imagecolorsforindex($resource, imagecolorat($resource, 0, 0));

        imagedestroy($resource);

        return array_slice(array_values($rgba), 0, 3);
    }
994263
public function getImages() : array
	{
		$list = array_merge( [
			'origin' => $this->getOriginImage(),
		], $this->getCropImages() );
		foreach( $list as $key => $image ){
			$image['path'] = str_replace( ROOT_PATH, '', $image['path'] );
			$list[$key]    = $image;
		}
		return $list;
	}
175966
public function getBorderSize() {
		$t = $this->getBorderTopSize();
		$l = $this->getBorderLeftSize();
		$r = $this->getBorderRightSize();
		$b = $this->getBorderBottomSize();
		$h = $this->getBorderInsideHSize();
		$v = $this->getBorderInsideVSize();
		
		return array($t, $l, $r, $b, $h, $v);
	}
1289048
public function getSmallestImageSet()
    {
        $imageSet = $this->getImageSet();

        $returnSize = PHP_INT_MAX;
        $returnSet = null;

        foreach ($imageSet as $set) {
            $size = $set->width * $set->height;
            if ($size < $returnSize) {
                $returnSize = $size;
                $returnSet = $set;
            }
        }

        if ($returnSet === null) {
            $returnSet = new \stdClass();
            $returnSet->slug = 'original';
        }

        return $returnSet;
    }
118168
public static function getImageSize( string $size = 'thumbnail') {
		$sizes = self::getImageSizes();
		$size  = key_exists( $size, $sizes ) ? $size : 'thumbnail';

		return $sizes[ $size ];
	}
649760
public static function getUnits() {
        return [
            self::FILE_SIZE_UNIT_B,
            self::FILE_SIZE_UNIT_KB,
            self::FILE_SIZE_UNIT_MB,
            self::FILE_SIZE_UNIT_GB,
            self::FILE_SIZE_UNIT_TB,
            self::FILE_SIZE_UNIT_PB,
            self::FILE_SIZE_UNIT_EB,
            self::FILE_SIZE_UNIT_ZB,
            self::FILE_SIZE_UNIT_YB,
        ];
    }
42266
protected function forPictures() : array
    {
        $pictures = Collection::make($this->all())->filter(function($item, $key) {
            return $key == 'pictures';
        })->get('pictures');

        if (is_null($pictures) || empty($pictures['storing'])) {
            return [];
        }

        return Collection::make($pictures['storing'])->mapWithKeys(function($item, $key) {
            return ['pictures.storing.' . $key => [
                'mimes:jpeg,png,jpg',
                Rule::dimensions()->maxWidth(1000)->maxHeight(500)
            ]];
        })->all();
    }
517086
public static function get_dimensions_for_size( $img_size ) {
		$width  = absint( $img_size['resize'][0] );
		$height = isset( $img_size['resize'][1] ) ? absint( $img_size['resize'][1] ) : 0;

		return array( $width, $height );
	}
923174
public function getSize() {
		list($this->width, $this->height) = $result = array(imagesx($this->image), imagesy($this->image));
		return $result;
	}
265672
public function getImageDimensions($src)
    {
        list($width, $height) = $this->getImageSize($src);

        return ['width' => $width, 'height' => $height];
    }
779801
public function getDimensionKeys()
    {
        $dimensions = Config::get('imageupload.dimensions');

        $fillable = [];

        if (empty($dimensions) || ! is_array($dimensions)) {
            return $fillable;
        }

        foreach ($dimensions as $name => $dimension) {
            foreach ($this->thumbnailKeys as $key => $cast) {
                array_push($fillable, $name.'_'.$key);
            }
        }

        return $fillable;
    }
701105
public function getSize()
    {
        return $this->oxarticles__oxlength->value *
                 $this->oxarticles__oxwidth->value *
                 $this->oxarticles__oxheight->value;
    }
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']);
    }