imagecreatefromwebp

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

imagecreatefromwebpBir dosya veya URL'den yeni bir görüntü oluşturur.

Açıklama

imagecreatefromwebp(string $filename): GdImage|false

imagecreatefromwebp() returns an image identifier representing the image obtained from the given filename.

İpucu

fopen sarmalayıcıları etkin kılınmışsa bu işlevde dosya ismi olarak bir URL belirtilebilir. Dosya isminin nasıl belirtilebileceği hakkında bilgi edinmek için fopen() işlevine bakılabilir. Sarmalayıcıların neler yapabildiği, kullanım bilgileri ve bunlar tarafından kullanılan öntanımlı değişkenler hakkında bilgi Desteklenen Protokoller ve Sarmalayıcılar bölümünde bulanabilir.

Değiştirgeler

filename

Path to the WebP image.

Dönen Değerler

Başarı durumunda görüntü nesnesi"", hata durumunda false döner.

Sürüm Bilgisi

Sürüm: Açıklama
8.0.0 On success, this function returns a GDImage instance now; previously, a resource was returned.

Örnekler

Örnek 1 Convert an WebP image to a jpeg image using imagecreatefromwebp()

<?php
// Load the WebP file
$im imagecreatefromwebp('./example.webp');

// Convert it to a jpeg file with 100% quality
imagejpeg($im'./example.jpeg'100);
imagedestroy($im);
?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top