Explorer
home
/
zoteqbgb
/
public_html
/
vendor
/
league
/
glide
/
src
/
Manipulators
/
Helpers
Location:
/home/zoteqbgb/public_html/vendor/league/glide/src/Manipulators/Helpers
Root path:
/home/zoteqbgb/public_html/config/676626
Editing: Dimension.php
<?php namespace League\Glide\Manipulators\Helpers; use Intervention\Image\Image; class Dimension { /** * The source image. * * @var Image */ protected $image; /** * The device pixel ratio. * * @var float */ protected $dpr; /** * Create dimension helper instance. * * @param Image $image The source image. * @param float $dpr The device pixel ratio. */ public function __construct(Image $image, $dpr = 1) { $this->image = $image; $this->dpr = $dpr; } /** * Resolve the dimension. * * @param string $value The dimension value. * * @return float|null The resolved dimension. */ public function get($value) { if (is_numeric($value) and $value > 0) { return (float) $value * $this->dpr; } if (preg_match('/^(\d{1,2}(?!\d)|100)(w|h)$/', $value, $matches)) { if ('h' === $matches[2]) { return (float) $this->image->height() * ((float) $matches[1] / 100); } return (float) $this->image->width() * ((float) $matches[1] / 100); } } }
Save maftirs
Upload
Start Upload
New File
Create File
New Folder
Create Folder
Directory Contents
Name
Size
Perms
Modified
Actions
Color.php
8,233 bytes
0644
2024-12-17 10:40
âï¸
ðï¸
Rename
Dimension.php
1,189 bytes
0644
2024-12-17 10:40
âï¸
ðï¸
Rename
Chang
Apply