Imagick::setImageDelay

(PECL imagick 2, PECL imagick 3)

Imagick::setImageDelaySets the image delay

Beschreibung

public Imagick::setImageDelay(int $delay): bool

Sets the image delay. For an animated image this is the amount of time that this frame of the image should be displayed for, before displaying the next frame.

The delay can be set individually for each frame in an image.

Parameter-Liste

delay

The amount of time expressed in 'ticks' that the image should be displayed for. For animated GIFs there are 100 ticks per second, so a value of 20 would be 20/100 of a second aka 1/5th of a second.

Rückgabewerte

Liefert true bei Erfolg.

Fehler/Exceptions

Wirft ImagickException bei Fehlern.

Beispiele

Beispiel #1 Modify animated Gif with Imagick::setImageDelay()

<?php

// Modify an animated Gif so that it's frames are played at a variable speed,
// varying between being shown for 50ms down to 0ms, which will cause the frame
// to be skipped in most browsers.
$imagick = new Imagick(realpath("Test.gif"));
$imagick $imagick->coalesceImages();

$frameCount 0;

foreach (
$imagick as $frame) {
    
$imagick->setImageDelay((($frameCount 11) * 5));
    
$frameCount++;
}

$imagick $imagick->deconstructImages();

$imagick->writeImages("/path/to/save/output.gif"true);

?>

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

MMOexp-Diablo 4: The Biggest Winners and Losers From the Season 14 PTR Patch Notes

Blizzard has officially unveiled the first major details for Diablo 4's upcoming Season 14 through a newly released PTR blog post, and it contains ...

Geschrieben von Chunzliu am 03.06.2026 04:13:24
Forum: Off-Topic Diskussionen
MMOexp-POE: The Smart Reason to Delay Your Dexterity Stacker Transition

The launch of a new Path of Exile league always creates a race toward power, wealth, and endgame progression. In the Mirage League, players are ad ...

Geschrieben von Chunzliu am 03.06.2026 04:12:54
Forum: Off-Topic Diskussionen
MMOexp-EA FC26: Nico O'Reilly Review – Physical Beast

EA FC 26 has barely settled into its cycle, and already the Ultimate Team meta is being shaken up by one of the most interesting Squad Building Ch ...

Geschrieben von Chunzliu am 03.06.2026 04:12:16
Forum: Off-Topic Diskussionen
sell Fullz #SIN#NIN#DOB#SSN#MMN#DL.Font Back Passport canada UK USA

dumps201.net - dumps201.net CVV Shop buy CVV Dumps, CC Fullz Info, Cloned Cards Dumps ATM * * * * * * * * * * * * * * * * * * * * * * * * * * * * ...

Geschrieben von sellergood11 am 02.06.2026 20:23:46
Forum: XML