Determines whether the dimensions are permitted by the CDN

@param int $iWidth  The width to check
@param int $iHeight The height to check
968026
public function isPermittedDimension($iWidth, $iHeight): bool
    {
        if (Factory::property('allowDangerousImageTransformation', 'nails/module-cdn')) {
            return true;
        } else {
            $sDimension = $iWidth . 'x' . $iHeight;
            return in_array($sDimension, $this->aPermittedDimensions);
        }
    }
1148330
function(oList, iWidth){
		iWidth = ExactAttribute._checkWidth(iWidth);
		var sPos = oList._bRTL ? "right" : "left";
		oList._iCurrentWidth = iWidth;
		oList._getAtt()._setWidth(oList._iCurrentWidth);
		oList.$("lst").css("width", iWidth + "px");
		oList.$("rsz").css(sPos, (iWidth - 4) + "px");
		if (oList._isTop()) {
			if (!isTopHidden(oList)) {
				oList.$("head").css("width", iWidth + "px");
				oList.$("cntnt").css(sPos, (iWidth + 8) + "px");
				oList.$("scroll").css(sPos, (iWidth + 8) + "px");
			}
		} else {
			if (!oList.$().hasClass("sapUiUx3ExactLstCollapsed")) {
				oList.$("cntnt").css("margin-" + sPos, iWidth + "px");
			}
		}
	}
523461
protected function calcWidth($width, $height)
    {
        $newWidthPercentage = (100 * $this->maxWidth) / $width;
        $newHeight = ($height * $newWidthPercentage) / 100;

        return array(
            'newWidth' => intval($this->maxWidth),
            'newHeight' => intval($newHeight)
        );
    }
948972
public function withSize($newWidth, $newHeight)
    {
        $newDimension = clone $this;

        if ($newWidth == 0 && $newHeight > 0) {
            $newDimension->withHeight($newHeight);
            $newWidth = $newDimension->getWidth();
        } else {
            if ($newWidth > 0 && $newHeight == 0) {
                $newDimension->withWidth($newWidth);
                $newHeight = $newDimension->getHeight();
            }
        }

        $targetDimension = clone $this;

        if ($this->directive === 'UP') {
            if ($newWidth > $this->width) {
                $targetDimension->width = $newWidth;
                $targetDimension->height = $newHeight;

                return $targetDimension;
            } elseif ($newWidth < $this->width) {
                return $targetDimension;
            }
        } elseif ($this->directive === 'DOWN') {
            if ($newWidth > $this->width) {
                return $targetDimension;
            } elseif ($newWidth < $this->width) {
                $targetDimension->width = $newWidth;
                $targetDimension->height = $newHeight;

                return $targetDimension;
            }
        }

        if ($this->maintainAspectRatio) {
            $targetDimension->width = $newWidth > $this->width ? $this->width : $newWidth;
            $targetDimension->height = $newHeight > $this->height ? $this->height : $newHeight;
        } else {
            $targetDimension->width = (int)$newWidth;
            $targetDimension->height = (int)$newHeight;
        }

        return $targetDimension;
    }
1249011
public function getCheckBannerImageFallback($BannerImage, $intWidth, $intHeight)
	{
		$fallback_content = false;
		$path_parts = pathinfo($BannerImage);
		if     ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.jpg') )
		{
			$fallback_ext     = '.jpg';
        	$fallback_content = true;
		}
		elseif ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.png') )
		{
			$fallback_ext     = '.png';
			$fallback_content = true;
		}
		elseif ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.gif') )
		{
		    $fallback_ext     = '.gif';
		    $fallback_content = true;
		}
		
		//if fallback image found, get image with size of flash size
		if ($fallback_content === true)
		{
		    //Get Image with sizes of flash
		    $src_fallback = \Image::get($this->urlEncode($path_parts['dirname'].'/'.$path_parts['filename'].$fallback_ext), $intWidth, $intHeight,'proportional');
		    return $src_fallback;
		}

		//no fallback image found
		return false;
	}
816158
public function cropFromCenter($cropWidth, $cropHeight = null)
    {
        if (!is_numeric($cropWidth)) {
            throw new \InvalidArgumentException('$cropWidth must be numeric');
        }

        if ($cropHeight !== null && !is_numeric($cropHeight)) {
            throw new \InvalidArgumentException('$cropHeight must be numeric');
        }

        if ($cropHeight === null) {
            $cropHeight = $cropWidth;
        }

        $cropWidth = ($this->currentDimensions['width'] < $cropWidth) ? $this->currentDimensions['width'] : $cropWidth;
        $cropHeight = ($this->currentDimensions['height'] < $cropHeight) ? $this->currentDimensions['height'] : $cropHeight;

        $cropX = intval(($this->currentDimensions['width'] - $cropWidth) / 2);
        $cropY = intval(($this->currentDimensions['height'] - $cropHeight) / 2);

        $this->crop($cropX, $cropY, $cropWidth, $cropHeight);

        return $this;
    }
1147826
function(w, h) {
			if (w && h) {
				/* Reset apparent image size first so container grows */
				this.$content.css('width', '').css('height', '');
				/* Calculate the worst ratio so that dimensions fit */
				 /* Note: -1 to avoid rounding errors */
				var ratio = Math.max(
					w  / (this.$content.parent().width()-1),
					h / (this.$content.parent().height()-1));
				/* Resize content */
				if (ratio > 1) {
					ratio = h / Math.floor(h / ratio); /* Round ratio down so height calc works */
					this.$content.css('width', '' + w / ratio + 'px').css('height', '' + h / ratio + 'px');
				}
			}
		}
1221509
public function getFootnotesHeight(float $cellWidth): float
    {
        $h = 0;
        foreach ($this->printedfootnotes as $element) {
            $h += $element->getFootnoteHeight($this, $cellWidth);
        }

        return $h;
    }
344143
public function setIndentWidth($indentWidth)
    {
        if (!is_null($indentWidth) &&
            (!is_int($indentWidth) || $indentWidth < 1)
        ) {
            throw new \InvalidArgumentException(
                'indentWidth needs to be null or an integer above 0'
            );
        }

        $this->indentWidth = $indentWidth;

        return $this;
    }
394880
public final void resize(float width, float height) {
        if (width < 0) {
            width = 0;
        }
        if (height < 0) {
            height = 0;
        }
        if (mWidth != width || mHeight != height) {
            mWidth = width;
            mHeight = height;
            onResize(width, height);
        }
    }
1369136
public function urlBlankAvatar($iWidth, $iHeight, $mSex = '')
    {
        $sUrl = $this->urlBlankAvatarScheme();

        //  Sub in the values
        $sUrl = str_replace('{{width}}', $iWidth, $sUrl);
        $sUrl = str_replace('{{height}}', $iHeight, $sUrl);
        $sUrl = str_replace('{{sex}}', $mSex, $sUrl);

        return $sUrl;
    }
472093
public function getDimension($w, $h) {
        $startlength = 4;
        $textlength = 2 * 7;
        $intercharlength = 2;

        $w += $startlength + $textlength + $intercharlength;
        $h += $this->thickness;
        return parent::getDimension($w, $h);
    }
1172662
protected function sanitizeWidth($width, $height)
	{
		// If no width was given we will assume it is a square and use the height.
		$width = ($width === null) ? $height : $width;

		// If we were given a percentage, calculate the integer value.
		if (preg_match('/^[0-9]+(\.[0-9]+)?\%$/', $width))
		{
			$width = (int) round($this->getWidth() * (float) str_replace('%', '', $width) / 100);
		}
		else
		{
			// Else do some rounding so we come out with a sane integer value.
			$width = (int) round((float) $width);
		}

		return $width;
	}
913399
function(imsize, olsize) {
        if (olsize !== null) {
            imsize.width = olsize.w;
            imsize.height = olsize.h;
            imsize.printwidth = olsize.w;
            imsize.printheight = olsize.h;
        }
    }
811595
function () {
			var width = '100%', offsetWidth;

			// Reset width/height so it will not mess
			this.overlay.width(width).height('100%');

			// jQuery does not return reliable result for IE
			if (IE) {
				offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);

				if (D.width() > offsetWidth) {
					width = D.width();
				}

			} else if (D.width() > W.width()) {
				width = D.width();
			}

			this.overlay.width(width).height(D.height());
		}
1281203
public function getDimension($w, $h) {
        $startlength = 9;
        $textlength = 9 * count($this->data);
        $checksumlength = 2 * 9;
        $endlength = 9 + 1; // + final bar

        $w += $startlength + $textlength + $checksumlength + $endlength;
        $h += $this->thickness;
        return parent::getDimension($w, $h);
    }
491846
public static function image_widthin($src, $dest, $w, $h) {
        $img = getimagesize(WEB_ROOT . $src);
        if (!$img) {
            return false;
        }
        $nw = $img[0];
        $nh = $img[1];
        if ($nw > $w && $w > 0) {
            $nh = (($w / $nw) * $nh);
            $nw = $w;
        }
        if ($nh > $h && $h > 0) {
            $nw = (($h / $nh) * $nw);
            $nh = $h;
        }
        if ($nw != $img[0] || $nh != $img[1]) {
            self::image_resize(WEB_ROOT . $src, WEB_ROOT . $dest, $nw, $nh);
        } else {
            copy(WEB_ROOT . $src, WEB_ROOT . $dest);
        }
        return $dest;
    }