Enter description here...

@param string $sImageSizeName - the image size name (found in shop_article_image_size)

@return TdbShopArticlePreviewImage
198129
public function &GetImagePreviewObject($sImageSizeName)
    {
        // check if the type has been defined...
        $oPreviewObject = TdbShopArticlePreviewImage::GetNewInstance();
        /** @var $oPreviewObject TdbShopArticlePreviewImage */
        if (!$oPreviewObject->LoadByName($this, $sImageSizeName)) {
            // if the article is a varaint, try the parent
            if ($this->IsVariant()) {
                $oParent = &$this->GetFieldVariantParent();
                $oPreviewObject = null;
                if (null != $oParent) {
                    $oPreviewObject = $oParent->GetImagePreviewObject($sImageSizeName);
                }
            } else {
                $oPreviewObject = null;
            }
        }

        return $oPreviewObject;
    }
65666
public function sizeUrl($size)
    {
        if (($this->base['return_format'] === 'array') && isset($this->base['value']['sizes'][$size])) {
            return $this->base['value']['sizes'][$size];
        } elseif ($this->base['return_format'] === 'id') {
            if ($src = wp_get_attachment_image_src($this->id(), $size)) {
                return $src[0];
            }
        }

        return '';
    }
1270689
function scaleImageWidth( $imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData )
    {
        $geometry = $this->calculateFixedWidthAspectGeometry( ImageSX( $imageObject ), ImageSY( $imageObject ),
                                                              $filterData['data'][0], true );
        return $this->scaleImageCopy( $imageObject,
                                      $geometry,
                                      $sourceMimeData, $destinationMimeData );
    }
837968
public function get($page, $pageSize, $websiteId = null, $storeId = null)
    {
        $this
            ->initCollection()
            ->filterMixedParam($websiteId, 'website_id')
            ->filterMixedParam($storeId, 'store_id')
            ->joinAddress('billing')
            ->joinAddress('shipping')
            ->joinSubscriptionStatus()
            ->setPage($page, $pageSize);

        return $this->customersResponseFactory->create()
            ->setCurrentPage($this->customerCollection->getCurPage())
            ->setLastPage($this->customerCollection->getLastPageNumber())
            ->setPageSize($this->customerCollection->getPageSize())
            ->setTotalCount($this->customerCollection->getSize())
            ->setCustomers($this->handleCustomers());
    }
637368
public function img($srcImagePath, $size = null, $options = []) {
        return Html::img(self::imgSrc($srcImagePath, $size), $options);
    }
1061353
public function render(Size $size)
    {
        $formatter = $this->getFormatter();
        $arguments = [
            $size->getWidth(),
            $size->getHeight(),
        ];

        if ($size->hasUnits()) {
            $arguments[] = $formatter->renderEscape($size->getWidthUnit());
            $arguments[] = $formatter->renderEscape($size->getHeightUnit());
        }

        return $formatter->renderObjectAssignment($size, $formatter->renderObject('Size', $arguments));
    }
941747
public function withImage(
        $name = null,
        $width = null,
        $height = null,
        $options = null)
    {
        $this->withRenamedImage($name, $name, $width, $height, $options);

        return $this;
    }
625441
public function setPageSize($size)
    {
        $this->pageSize = ($size === null ? self::PAGE_SIZE : (int)$size);
        if ($this->pageSize < 0)
            $this->pageSize = self::PAGE_SIZE;

        return $this;
    }
703720
public static function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale)
    {
        $newImageWidth = ceil($width * $scale);
        $newImageHeight = ceil($height * $scale);
        $newImage = imagecreatetruecolor($newImageWidth, $newImageHeight);
        $source = imagecreatefromjpeg($image);
        imagecopyresampled($newImage, $source, 0, 0, $start_width, $start_height, $newImageWidth, $newImageHeight, $width, $height);
        imagejpeg($newImage, $thumb_image_name, 90);
        chmod($thumb_image_name, 0777);

        return $thumb_image_name;
    }
143381
public function getImageSize(PersistentResource $resource)
    {
        $cacheIdentifier = $resource->getCacheEntryIdentifier();

        $imageSize = $this->imageSizeCache->get($cacheIdentifier);
        if ($imageSize !== false) {
            return $imageSize;
        }

        // TODO: Special handling for SVG should be refactored at a later point.
        if ($resource->getMediaType() === 'image/svg+xml') {
            $imageSize = ['width' => null, 'height' => null];
        } else {
            try {
                $imagineImage = $this->imagineService->read($resource->getStream());
                $sizeBox = $imagineImage->getSize();
                $imageSize = ['width' => $sizeBox->getWidth(), 'height' => $sizeBox->getHeight()];
            } catch (\Exception $e) {
                throw new ImageFileException(sprintf('The given resource was not an image file your choosen driver can open. The original error was: %s', $e->getMessage()), 1336662898);
            }
        }

        $this->imageSizeCache->set($cacheIdentifier, $imageSize);
        return $imageSize;
    }
188716
public function getPaperSize($paperSize = null)
    {
        $size = $paperSize !== null ? $paperSize : $this->paperSize;
        if (is_array($size)) {
            return $size;
        } else if (isset(Adapter\CPDF::$PAPER_SIZES[mb_strtolower($size)])) {
            return Adapter\CPDF::$PAPER_SIZES[mb_strtolower($size)];
        } else {
            return Adapter\CPDF::$PAPER_SIZES["letter"];
        }
    }
1113768
public function actionIndex()
    {
        $model = new MediaConfigurationForm();
        $model->thumbnail_size_width = Media::getConfigurationThumbnailSizeWidth();
        $model->thumbnail_size_height = Media::getConfigurationThumbnailSizeHeight();
        $model->medium_size_width = Media::getConfigurationMediumSizeWidth();
        $model->medium_size_height = Media::getConfigurationMediumSizeHeight();
        $model->large_size_width = Media::getConfigurationLargeSizeWidth();
        $model->large_size_height = Media::getConfigurationLargeSizeHeight();
        $model->quality = Media::getConfigurationQuality();
        if ($model->load(\request()->post())) {
            if ($model->config()) {
                set_flash_has_been_saved();

                return $this->redirect(Url::to(['index']));
            } else {
                set_flash_has_not_been_saved();

                return $this->render('index', ['model' => $model]);
            }
        } else {
            return $this->render('index', ['model' => $model]);
        }
    }
115688
public function getBoxSize(array $imageSize, array $size)
    {
        list($width, $height) = $size;

        if ((null == $width) && (null == $height)) {
            return $imageSize;
        }

        list($imageWidth, $imageHeight) = $imageSize;

        if ((null !== $width) && (null == $height)) {
            $height = ceil($width * ($imageHeight / $imageWidth));

            if ($height > $imageHeight) {
                $height = $imageHeight;
            }

            return array($width, $height);
        }

        if ((null === $width) && (null != $height)) {
            $width = ceil($height * ($imageWidth / $imageHeight));

            if ($width > $imageWidth) {
                $width = $imageWidth;
            }

            return array($width, $height);
        }

        return $size;
    }
1301711
public static function ProfileImage(string $userName = NULL, int $size = 0)
    {
        $sizeSuffix = $size == 0 ? "" : "@{$size}";
        $s = static::$DataUrl . "/profimg/{$userName}{$sizeSuffix}";
        return $s;
    }
851580
def getPageSizeByName(self, pageSizeName):
		
		pageSize = None

		lowerCaseNames = {pageSize.lower(): pageSize for pageSize in
		                  self.availablePageSizes()}
		if pageSizeName.lower() in lowerCaseNames:
			pageSize = getattr(QPagedPaintDevice, lowerCaseNames[pageSizeName.lower()])

		return pageSize
658665
public function resizeAction()
    {
        $request = $this
            ->requestStack
            ->getCurrentRequest();

        /**
         * Request not found because this controller is not running under
         * Request scope.
         */
        if (!($request instanceof Request)) {
            throw new RuntimeException('Request object not found');
        }

        $id = $request->get('id');

        /**
         * We retrieve image given its id.
         */
        $image = $this
            ->imageRepository
            ->find($id);

        if (!($image instanceof ImageInterface)) {
            throw new EntityNotFoundException($this->imageRepository->getClassName());
        }

        return $this->buildResponseFromImage(
            $request,
            $image
        );
    }
585116
public function size(String $fileName) : stdClass
    {
        if( $this->mime->type($fileName, 0) === 'image' )
        {
            $data = getimagesize($fileName);
        }
        elseif( is_string($fileName) )
        {
            $data = getimagesizefromstring($fileName);
        }
        else
        {
            throw new InvalidArgumentException(NULL, '[file]');
        }

        return (object)
        [
            'width'     => $data[0],
            'height'    => $data[1],
            'extension' => $this->extension($data[2]),
            'img'       => $data[3],
            'bits'      => $data['bits'],
            'mime'      => $data['mime']
        ];
    }