Return all the available sizes for thumbnails

@return mixed[]
342352
public function getThumbnailSizeList(): array
    {
        $thumbnails = [];
        $versions = Configure::read('ThumbnailVersions', []);
        foreach ($versions as $version => $definition) {
            $thumbnails[$version] = sprintf(
                '%s (%d x %d)',
                ucfirst($version),
                $definition['thumbnail']['width'],
                $definition['thumbnail']['height']
            );
        }

        return $thumbnails;
    }
717525
public function size(){
        if(empty($this->img)) $this->throwError('没有指定图像资源');
        return array($this->info['width'], $this->info['height']);
    }
723586
public function PaginatedGalleries()
    {
        $children = $this->AllChildren();
        $limit = $this->ThumbnailsPerPage;
        $list = ArrayList::create();

        foreach ($children as $child) {
            $image = $child->SortedImages()->first();
            $child_data = $child->toMap();
            $child_data["Link"] = $child->Link();
            if ($image) {
                $child_data["GalleryThumbnail"] = $this->ScaledImage($image, true);
            } else {
                $child_data["GalleryThumbnail"] = null;
            }
            $list->add(ArrayData::create($child_data));
        }

        $pages = PaginatedList::create($list, $this->getRequest());
        $pages->setPageLength($limit);

        return $pages;
    }
994037
public function getBorderSize() {
		$t = $this->getBorderTopSize();
		$l = $this->getBorderLeftSize();
		$r = $this->getBorderRightSize();
		$b = $this->getBorderBottomSize();
		
		return array($t, $l, $r, $b);
	}
998847
private function getThemeImageSizes()
    {
        $dataProvider = new DefaultDataProvider();
        $dataProvider->setBaseConfig(['source' => 'tl_image_size']);

        $config = $dataProvider->getEmptyConfig();
        $config->setFields(['id', 'name', 'width', 'height']);
        $config->setSorting(['pid', 'name']);

        $collection = $dataProvider->fetchAll($config);
        if (!$collection->count()) {
            return [];
        }

        $sizes = [];
        foreach ($collection as $model) {
            $sizes[$model->getProperty('id')] = sprintf(
                '%s (%sx%s)',
                $model->getProperty('name'),
                $model->getProperty('width'),
                $model->getProperty('height')
            );
        }

        return $sizes;
    }
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 );
	}
1044192
public function getDimensions()
    {
        $imageDimension = getimagesize($this->image);

        $width  = $imageDimension[0];
        $height = $imageDimension[1];

        foreach($this->effect as $effect)
        {
            if($effect instanceof PictureEffect)
            {
                $modified = $effect->getNewDimensions($width, $height);

                $width  = $modified['w'];
                $height = $modified['h'];
            }
        }

        return array(

            'w' => $width,
            'h' => $height,
        );
    }
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);
    }
1063307
private function mapImage(): array
    {
        $previewUri = $this->resourceManager->getPublicPersistentResourceUri($this->image->getResource());

        return [
            'previewUri' => $previewUri,
            'width' => $this->image->getWidth(),
            'height' => $this->image->getHeight(),
            'persistenceIdentifier' => $this->persistenceManager->getIdentifierByObject($this->image)
        ];
    }
632325
public function dimensions()
	{
		if (!$this->dimensions)
		{
			$this->dimensions = array(0, 0);

			if ($this->isImage() && file_exists($this->path()))
			{
				$this->dimensions = getimagesize($this->path());
			}
		}

		return $this->dimensions;
	}
1216536
def get_image_sizes(image):
    """"""

    # It is possible to have the same width appear more than once, if
    # THUMBNAIL_UPSCALE is set to False and the image's width is less than the
    # largest value in FLEXIBLE_IMAGE_SIZES. So keep track of widths and
    # don't output more than one image with the same width (which would result
    # in an invalid `srcset` attribute).
    sizes = []
    seen_widths = []

    for size in settings_sizes():
        img = get_thumbnail_shim(image, size)

        if img.width in seen_widths:
            continue

        seen_widths.append(img.width)

        sizes.append({
            "url": img.url,
            "width": img.width,
            "height": img.height,
        })
    return sizes
398731
public static function get_image_sizes()
    {
        global $_wp_additional_image_sizes;

        $sizes = [];

        $dynamic_sizes = Size_Manager::get_dynamic_sizes();

        foreach (\get_intermediate_image_sizes() as $size) {
            if (\in_array($size, ['thumbnail', 'medium', 'medium_large', 'large'])) {
                $sizes[ $size ] = [
                    'width' => \get_option("{$size}_size_w"),
                    'height' => \get_option("{$size}_size_h"),
                    'crop' => (bool) \get_option("{$size}_crop"),
                    'generated_on_upload' => ! \in_array($size, $dynamic_sizes),
                ];
            }

            if (isset($_wp_additional_image_sizes[ $size ])) {
                $sizes[ $size ] = [
                    'width'  => $_wp_additional_image_sizes[ $size ]['width'],
                    'height' => $_wp_additional_image_sizes[ $size ]['height'],
                    'crop'   => $_wp_additional_image_sizes[ $size ]['crop'],
                    'generated_on_upload' => ! \in_array($size, $dynamic_sizes),
                ];
            }
        }

        return $sizes;
    }
338961
public function attributes(): array
    {
        $attributes = [];

        if (!$this->isExternal() || $this->fileExists()) {
            $file = $this->folder() . $this->multimedia_file_refn;

            $attributes['__FILE_SIZE__'] = $this->fileSizeKB();

            $imgsize = getimagesize($file);
            if (is_array($imgsize) && !empty($imgsize['0'])) {
                $attributes['__IMAGE_SIZE__'] = I18N::translate('%1$s × %2$s pixels', I18N::number($imgsize['0']), I18N::number($imgsize['1']));
            }
        }

        return $attributes;
    }
441221
public function getImageAttributes()
    {
        $attributes = [
            'src' => $this->ImageURL,
            'class' => $this->ImageClass,
            'title' => $this->ImageTitleText,
            'alt' => $this->ImageAltText
        ];
        
        if ($this->hasVectorImage()) {
            
            if ($width = $this->ImageResizeWidth) {
                $attributes['width'] = $width;
            }
            
            if ($height = $this->ImageResizeHeight) {
                $attributes['height'] = $height;
            }
            
        }
        
        $this->extend('updateImageAttributes', $attributes);
        
        return $attributes;
    }
904479
public function getThumbnails()
	{
		$thumbs = array();

		foreach ($this->xml->children('media', true)->group->thumbnail as $item)
		{
			$url = (string) $item->attributes()->url;
			$width = (int) $item->attributes()->width;
			$height = (int) $item->attributes()->height;
			$thumbs[$width] = array('url' => $url, 'w' => $width, 'h' => $height);
		}

		return $thumbs;
	}
1305459
public function getSizes()
    {
        $sizes = [];
        if ($this->phoneSize === 'auto') {
            $sizes['phone'] = $this->generatePhoneSize();
        } elseif ($this->phoneSize === true && $this->hasPhoneColumns) {
            $sizes['phone'] = $this->phoneColumns;
        }
        if ($this->tabletSize === 'auto') {
            $sizes['tablet'] = $this->generateTabletSize();
        } elseif ($this->tabletSize === true && $this->hasTabletColumns) {
            $sizes['tablet'] = $this->tabletColumns;
        }
        if ($this->mediumDesktopSize === 'auto') {
            $sizes['mediumDesktop'] = $this->generateMediumDesktopSize();
        } elseif ($this->mediumDesktopSize === true && $this->hasMediumDesktopColumns) {
            $sizes['mediumDesktop'] = $this->mediumDesktopColumns;
        }
        if ($this->largeDesktopSize === 'auto') {
            $sizes['largeDesktop'] = $this->generateLargeDesktopSize();
        } elseif ($this->largeDesktopSize === true && $this->hasLargeDesktopColumns) {
            $sizes['largeDesktop'] = $this->largeDesktopColumns;
        }

        return $sizes;
    }
71211
public static function getList()
    {
        $app = Application::getFacadeApplication();
        $em = $app->make(EntityManagerInterface::class);

        return $em->getRepository(ThumbnailTypeEntity::class)->findBy([], ['ftTypeWidth' => 'asc']);
    }