Return the pixel aspect ratio of the movie.

@return float
162143
public function getPixelAspectRatio()
    {
        if ($this->pixelAspectRatio === null) {
            $match = [];
            preg_match(self::$REGEX_PIXEL_ASPECT_RATIO, $this->output, $match);
            $this->pixelAspectRatio = (array_key_exists(1, $match) && array_key_exists(
                    2,
                    $match
                )) ? ($match[1] / $match[2]) : 0;
        }

        return $this->pixelAspectRatio;
    }
563196
public function getSize()
    {
        if (null === ($length = $this->stream->getSize())) {
            return null;
        } elseif (-1 == $this->limit) {
            return $length - $this->offset;
        } else {
            return min($this->limit, $length - $this->offset);
        }
    }
144401
protected function calculateRowsSize()
    {
        $this->_columnWidths = $columns = [];
        $totalWidth = 0;
        $screenWidth = $this->getScreenWidth() - self::CONSOLE_SCROLLBAR_OFFSET;

        for ($i = 0, $count = count($this->_headers); $i < $count; $i++) {
            $columns[] = ArrayHelper::getColumn($this->_rows, $i);
            $columns[$i][] = $this->_headers[$i];
        }

        foreach ($columns as $column) {
            $columnWidth = max(array_map(function ($val) {
                if (is_array($val)) {
                    $encodings = array_fill(0, count($val), $this->app->encoding);
                    return max(array_map('mb_strwidth', $val, $encodings)) + mb_strwidth($this->_listPrefix, $this->app->encoding);
                }

                return mb_strwidth($val, $this->app->encoding);
            }, $column)) + 2;
            $this->_columnWidths[] = $columnWidth;
            $totalWidth += $columnWidth;
        }

        $relativeWidth = $screenWidth / $totalWidth;

        if ($totalWidth > $screenWidth) {
            foreach ($this->_columnWidths as $j => $width) {
                $this->_columnWidths[$j] = (int) ($width * $relativeWidth);
                if ($j === count($this->_columnWidths)) {
                    $this->_columnWidths = $totalWidth;
                }
                $totalWidth -= $this->_columnWidths[$j];
            }
        }
    }
157166
public function getLineHeight()
    {
        $lineHeight = $this->getFontSize() * 1.2 * $this->getLineSpacing();
        $this->convertFromPoints($lineHeight);
        return $lineHeight;
    }
768521
public function getLuminosity(): float
    {
        $rSrgb = $this->colors['r'] / 255;
        $gSrgb = $this->colors['g'] / 255;
        $bSrgb = $this->colors['b'] / 255;

        $r = $rSrgb <= 0.03928 ? $rSrgb / 12.92 : pow(($rSrgb + 0.055) / 1.055, 2.4);
        $g = $gSrgb <= 0.03928 ? $gSrgb / 12.92 : pow(($gSrgb + 0.055) / 1.055, 2.4);
        $b = $bSrgb <= 0.03928 ? $bSrgb / 12.92 : pow(($bSrgb + 0.055) / 1.055, 2.4);

        return (0.2126 * $r) + (0.7152 * $g) + (0.0722 * $b);
    }
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);
    }
870199
public function getBoxSize()
    {
        $box = [];

        if ($this->hasApplicableFontFile()) {

            // get bounding box with angle 0
            $box = imagettfbbox($this->getPointSize(), 0, $this->file, $this->text);

            // rotate points manually
            if ($this->angle != 0) {

                $angle = pi() * 2 - $this->angle * pi() * 2 / 360;

                for ($i=0; $i<4; $i++) {
                    $x = $box[$i * 2];
                    $y = $box[$i * 2 + 1];
                    $box[$i * 2] = cos($angle) * $x - sin($angle) * $y;
                    $box[$i * 2 + 1] = sin($angle) * $x + cos($angle) * $y;
                }
            }

            $box['width'] = intval(abs($box[4] - $box[0]));
            $box['height'] = intval(abs($box[5] - $box[1]));

        } else {

            // get current internal font size
            $width = $this->getInternalFontWidth();
            $height = $this->getInternalFontHeight();

            if (strlen($this->text) == 0) {
                // no text -> no boxsize
                $box['width'] = 0;
                $box['height'] = 0;
            } else {
                // calculate boxsize
                $box['width'] = strlen($this->text) * $width;
                $box['height'] = $height;
            }
        }

        return $box;
    }
62399
public function getResize()
    {
        $ratio = 1.0;
        $image = request('img');

        $original_image = Image::make($this->lfm->setName($image)->path('absolute'));
        $original_width = $original_image->width();
        $original_height = $original_image->height();

        $scaled = false;

        // FIXME size should be configurable
        if ($original_width > 600) {
            $ratio = 600 / $original_width;
            $width = $original_width * $ratio;
            $height = $original_height * $ratio;
            $scaled = true;
        } else {
            $width = $original_width;
            $height = $original_height;
        }

        if ($height > 400) {
            $ratio = 400 / $original_height;
            $width = $original_width * $ratio;
            $height = $original_height * $ratio;
            $scaled = true;
        }

        return view('laravel-filemanager::resize')
            ->with('img', $this->lfm->pretty($image))
            ->with('height', number_format($height, 0))
            ->with('width', $width)
            ->with('original_height', $original_height)
            ->with('original_width', $original_width)
            ->with('scaled', $scaled)
            ->with('ratio', $ratio);
    }
302601
public function getWidth()
    {
        if ($this->getSize() == static::SIZE_INVISIBLE) {
            return 1;
        }
        if ($this->getSize() == static::SIZE_TINY) {
            return 30;
        }

        $modifier = 0;
        if ($this->getTimeCode()) {
            $modifier = 75;
        }

        if ($this->getSize() == static::SIZE_SMALL) {
            return 150 + $modifier;
        }
        if ($this->getSize() == static::SIZE_MEDIUM) {
            return 187 + $modifier;
        }
        // static::SIZE_LARGE
        return 224 + $modifier;
    }
1172155
public function getChroma() {
		$r = ($this->rgb >> 16) & 0xff;
		$g = ($this->rgb >> 8) & 0xff;
		$b = $this->rgb & 0xff;
		return (max($r, $g, $b) - min($r, $g, $b)) / 255;
	}
256457
public function getFloatMinor()
    {
        if ($this->startsWith($this->minor, '0'))
            return (float) ('0.'.substr($this->minor, 1));
        return (float) $this->minor;
    }
372711
public function canvasImageScale()
    {
        $imageOriginalWidth = imagesx($this->oImg);
        $imageOriginalHeight = imagesy($this->oImg);
        $scale = min($imageOriginalWidth / $this->options ['width'], $imageOriginalHeight / $this->options ['height']);

        $this->options ['cropWidth'] = ceil($this->options ['width'] * $scale);
        $this->options ['cropHeight'] = ceil($this->options ['height'] * $scale);

        $this->options ['minScale'] = min($this->options ['maxScale'], max(1 / $scale, $this->options ['minScale']));

        if ($this->options ['prescale'] !== false)
        {
            $this->preScale = 1 / $scale / $this->options ['minScale'];
            if ($this->preScale < 1)
            {
                $this->canvasImageResample(ceil($imageOriginalWidth * $this->preScale), ceil($imageOriginalHeight * $this->preScale));
                $this->options ['cropWidth'] = ceil($this->options ['cropWidth'] * $this->preScale);
                $this->options ['cropHeight'] = ceil($this->options ['cropHeight'] * $this->preScale);
            }
            else
            {
                $this->preScale = 1;
            }
        }

        return $this;
    }
309220
public function getRelativeCenterY()
    {
        $pos = 50;
        if ($this->FaceCentreY > 0 && $this->OriginalHeight > 0) {
            $pos = $this->FaceCentreY / $this->OriginalHeight * 100;
            $pos = ($pos > 100 || $pos < 0) ? 50 : $pos;
        }

        return $pos;
    }
575313
public function Width()
    {
        if (!($this->width > 0))
            $this->width = \imagesx($this->resource);
        
        return $this->width;
    }
724084
public function getFrameRate()
    {
        if ($this->frameRate === null) {
            $match = [];
            preg_match(self::$REGEX_FRAME_RATE, $this->output, $match);
            $this->frameRate = (float)(array_key_exists(1, $match) ? $match[1] : 0.0);
        }

        return $this->frameRate;
    }
708565
private int bytesPerPixel() {
		long fileSize = data.getFile().length();
		long pixelMax = getXPixels() * (long) getYPixels();
		// ceil result, because it is a maximum that we use to divide
		return (int) Math.ceil(fileSize / (double) pixelMax);
	}
599070
public String getRatio() {

        if (m_ratio == null) {
            m_ratio = "" + getScaler().getWidth() + "-" + getScaler().getHeight();
        }
        return m_ratio;
    }