imagecreatefrombmp

(PHP 7 >= 7.2.0)

imagecreatefrombmpTworzy nowy obraz z pliku lub URL

Opis

imagecreatefrombmp ( string $filename ) : resource

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

Wskazówka

Jeśli włączona jest dyrektywa konfiguracyjna fopen wrappers, możliwe jest podanie jako nazwy pliku adresu URL. Zobacz opis funkcji fopen() aby dowiedzieć się jak przekazać nazwę pliku, oraz fopen wrappers aby uzyskać listę obsługiwanych protokołów.

Parametry

filename

Path to the BMP image.

Zwracane wartości

Zwraca identyfikator zasobu obrazu w przypadku powodzenia lub FALSE w przypadku błędów.

Przykłady

Przykład #1 Convert an BMP image to a PNG image using imagecreatefrombmp()

<?php
// Load the BMP file
$im imagecreatefrombmp('./example.bmp');

// Convert it to a PNG file with default settings
imagepng($im'./example.png');
imagedestroy($im);
?>

add a note add a note

User Contributed Notes

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