imagesx
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get image width
imagesx
(
GdImage $image
):
int
Intervention/image
public function
execute
(
$image
)
{
$this
->
setOutput
(new
Size
(
imagesx
(
$image
->
getCore
()),
imagesy
(
$image
->
getCore
())
));
src/Intervention/Image/Gd/Commands/GetSizeCommand.php
Intervention/image
public function
gdResourceToTruecolor
(&
$resource
)
{
$width
=
imagesx
(
$resource
);
$height
=
imagesy
(
$resource
);
src/Intervention/Image/Gd/Decoder.php
Intervention/image
public function
cloneCore
(
$core
)
{
$width
=
imagesx
(
$core
);
$height
=
imagesy
(
$core
);
$clone
=
imagecreatetruecolor
(
$width
,
$height
);
imagealphablending
(
$clone
,
false
);
src/Intervention/Image/Gd/Driver.php
symfony/var-dumper
public static function
castGd
(
$gd
, array
$a
,
Stub $stub
,
bool $isNested
)
{
$a
[
'size'
] =
imagesx
(
$gd
).
'x'
.
imagesy
(
$gd
);
$a
[
'trueColor'
] =
imageistruecolor
(
$gd
);
return
$a
;
Caster/ResourceCaster.php