Skip to content

Commit 2dd6ae6

Browse files
committed
fix formatting for phpcs
1 parent 24831a1 commit 2dd6ae6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/animate-image.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@
1313

1414
$image = Vips\Image::newFromFile($argv[1]);
1515
$text = Vips\Image::text($argv[3], ["dpi" => 300, "rgba" => true]);
16-
$animation = NULL;
16+
$animation = null;
1717
$delay = [];
1818

19-
for ($x = 0; $x < $image->width + $text->width; $x += 10)
20-
{
19+
for ($x = 0; $x < $image->width + $text->width; $x += 10) {
2120
// append the frame to the image vertically ... we make a very tall, thin
2221
// strip of frames to save
2322
$frame = $image->composite2($text, "over", [
2423
"x" => $x - $text->width,
2524
"y" => $image->height / 2 - $text->height / 2
2625
]);
27-
if ($animation == NULL)
26+
if ($animation == null) {
2827
$animation = $frame;
29-
else
28+
}
29+
else {
3030
$animation = $animation->join($frame, "vertical");
31+
}
3132

3233
// frame delay in ms
3334
array_push($delay, 30);

0 commit comments

Comments
 (0)