update page now
Laravel Live Japan

imagecreatefromxbm

(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)

imagecreatefromxbmСтворює нове зображення з файла або URL

Опис

imagecreatefromxbm(string $filename): GdImage|false

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

Підказка

URL як назву файлу можна використовувати з цією функцією, якщо ввімкнені обгортки fopen. Докладніше про те, як вказати назву файлу: fopen(). На сторінці Підтримувані протоколи та обгортки є посилання на інформацію про можливості різних обгорток, примітки щодо їхнього використання, інформацію про будь-які попередньо визначені цими обгортками змінні.

Параметри

filename

Path to the XBM image.

Значення, що повертаються

Повертає об'єкт зображення в разі успіху або false в разі помилок.

Журнал змін

Версія Опис
8.0.0 On success, this function returns a GDImage instance now; previously, a resource was returned.

Приклади

Приклад #1 Convert an XBM image to a png image using imagecreatefromxbm()

<?php
/ Load the xbm file
$xbm = imagecreatefromxbm('./example.xbm');

/ Convert it to a png file
imagepng($xbm, './example.png');
?>

add a note

User Contributed Notes

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant