Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<imagecreatefromstringimagecreatefromwbmp>
^GD and Image FunctionsLast updated: Mon, 26 Oct 2026

imagecreatefromtga

(PHP 7 >= 7.4.0, PHP 8)

imagecreatefromtga — Create a new image from file or URL

Description

function imagecreatefromtga(string $filename): GdImage|false

imagecreatefromtga() returns an image object representing the image obtained from the given filename.

Parameters

filename

Path to the Truevision TGA image.

Return Values

Returns an image object on success, false on errors.

Changelog

Version Description
8.0.0 On success, this function returns a GDImage instance now; previously, a resource was returned.

<imagecreatefromstringimagecreatefromwbmp>
^GD and Image FunctionsLast updated: Mon, 26 Oct 2026