array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.imagetypes.php', 1 => 'imagetypes', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD ve Görüntü İşlevleri', ), 'prev' => array ( 0 => 'function.imagettftext.php', 1 => 'imagettftext', ), 'next' => array ( 0 => 'function.imagewbmp.php', 1 => 'imagewbmp', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/image/functions/imagetypes.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
imagetypes — Kurulu PHP'nin desteklediği görüntü türlerini döndürür
Bu işlevin bağımsız değişkeni yoktur.
PHP ile ilitilenmiş GD kütüphanesinin desteklediği görüntü biçemleri ile
ilgili bir bit alanı döndürür. Bu alanla sınanabilecek sabitlerin isimleri:
IMG_AVIF
| IMG_BMP
|
IMG_GIF
| IMG_JPG
|
IMG_PNG
| IMG_WBMP
|
IMG_XPM
| IMG_WEBP
.
Sürüm: | Açıklama |
---|---|
8.1.0 |
IMG_AVIF eklendi.
|
7.2.0 |
IMG_BMP eklendi.
|
7.0.10 |
IMG_WEBP eklendi.
|
Örnek 1 - PNG desteğinin sınanması
<?php
if (imagetypes() & IMG_PNG) {
echo "PNG destekleniyor";
}
?>