Imagick::compositeImage

(PECL imagick 2, PECL imagick 3)

Imagick::compositeImageComposite one image onto another

Beschreibung

public Imagick::compositeImage(
    Imagick $composite_object,
    int $composite,
    int $x,
    int $y,
    int $channel = Imagick::CHANNEL_DEFAULT
): bool

Composite one image onto another at the specified offset. Any extra arguments needed for the compose algorithm should passed to setImageArtifact with 'compose:args' as the first parameter and the data as the second parameter.

Parameter-Liste

composite_object

Imagick object which holds the composite image

compose

Composite operator. See Composite Operator Constants

x

The column offset of the composited image

y

The row offset of the composited image

channel

Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Refer to this list of channel constants.

Rückgabewerte

Liefert true bei Erfolg.

Beispiele

Beispiel #1 Using Imagick::compositeImage():

Composite two images with the 'mathematics' compose method

<?php

// Equivalent to running the command
// convert src1.png src2.png -compose mathematics -define compose:args="1,0,-0.5,0.5" -composite output.png

$src1 = new \Imagick("./src1.png");
$src2 = new \Imagick("./src2.png");

$src1->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);
$src1->setImageArtifact('compose:args'"1,0,-0.5,0.5");
$src1->compositeImage($src2Imagick::COMPOSITE_MATHEMATICS00);
$src1->writeImage("./output.png");

?>

Siehe auch

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

mein PHP-Neustart und eine kleine Baustelle

Hallo zusammen, Ich heiße Matthias Wagner und bin seit ein paar Tagen hier im Forum. Ich habe früher hauptsächlich mit HTML und ein bisschen Ja ...

Geschrieben von matthiaswagner am 30.09.2025 09:56:45
Forum: User stellen sich vor
"Baustellen" endlich angehen?

Beleuchtung ist zum Beispiel ein Thema, gerade Außenleuchten, vor welchem ich mich jahrelang gedrückt habe. Jetzt gibt es kein Zurück! Basketba ...

Geschrieben von seraphina am 30.09.2025 05:19:50
Forum: Off-Topic Diskussionen
Benutzt jemand PHPRUNNER ?

Jetzt soll anhand der gewählten Auswahl von (PLZ) im Feld ( ORT ) der gewählte primary_key und davon nur der passende Wert von "city" automatisc ...

Geschrieben von seraphina am 30.09.2025 05:18:09
Forum: Off-Topic Diskussionen
mysql tabelle mit php ausgeben und zeilenfarbe je nach inhalt ändern

You can output a MySQL table with PHP and change row colors based on content by checking each row’s value inside your loop and assigning a CSS c ...

Geschrieben von AxelWilson am 29.09.2025 12:00:53
Forum: PHP Developer Forum