ord
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Convert the first byte of a string to a value between 0 and 255
ord
(
string $character
):
int
$img
=
$this
->
manager
()->
make
(
'tests/images/trim.png'
);
$img
->
interlace
();
$img
->
encode
(
'png'
);
$this
->
assertTrue
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
$img
->
interlace
(
false
);
$img
->
encode
(
'png'
);
$this
->
assertFalse
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
tests/GdSystemTest.php
$this
->
assertTrue
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
$img
->
interlace
(
false
);
$img
->
encode
(
'png'
);
$this
->
assertFalse
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
}
public function
testGammaImage
()
tests/GdSystemTest.php
$img
=
$this
->
manager
()->
make
(
'tests/images/trim.png'
);
$img
->
interlace
();
$img
->
encode
(
'png'
);
$this
->
assertTrue
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
$img
->
interlace
(
false
);
$img
->
encode
(
'png'
);
$this
->
assertFalse
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
tests/ImagickSystemTest.php
$this
->
assertTrue
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
$img
->
interlace
(
false
);
$img
->
encode
(
'png'
);
$this
->
assertFalse
((
ord
(
$img
->
encoded
[
28
]) !=
'0'
));
}
public function
testGammaImage
()
tests/ImagickSystemTest.php