imagecreatefrombmp

(PHP 7 >= 7.2.0, PHP 8)

imagecreatefrombmpCria uma nova imagem a partir de arquivo ou URL

Descrição

imagecreatefrombmp ( string $filename ) : GdImage|false

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

Dica

Uma URL pode ser utilizada como um nome de arquivo se fopen wrappers estiver ativo. Veja fopen() para mais detalhes em como especificar o filename. Veja também the Protocolos e Wrappers suportados para informações sobre que capacidades cada wrapper tem, notas de uso e informações sobre variáveis predefinidas fornecidas.

Parâmetros

filename

Path to the BMP image.

Valor Retornado

Retorna um resource de imagem no sucesso, false em erros.

Changelog

Versão Descrição
8.0.0 On success, this function returns a GDImage instance now; previously, a resource was returned.

Exemplos

Exemplo #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