imagecreatefrompng - Create a new image from file or URL - PHP

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Anubis is the god of death in ancient egpypt
Seçkin Üye
Katılım
27 Ocak 2020
Mesajlar
341
Tepki puanı
18
Ödüller
3
6 HİZMET YILI
Kod:
resource imagecreatefrompng ( string $filename )
Create a new image from file or URL

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

Kod:
<?php
function LoadPNG($imgname)
{
    /* Attempt to open */
    $im = @imagecreatefrompng($imgname);

    /* See if it failed */
    if(!$im)
    {
        /* Create a blank image */
        $im  = imagecreatetruecolor(150, 30);
        $bgc = imagecolorallocate($im, 255, 255, 255);
        $tc  = imagecolorallocate($im, 0, 0, 0);

        imagefilledrectangle($im, 0, 0, 150, 30, $bgc);

        /* Output an error message */
        imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc);
    }

    return $im;
}header('Content-Type: image/png');$img = LoadPNG('bogus.image');imagepng($img);imagedestroy($img);?>
 
Lord Beerus
Süper Üye
Katılım
27 Şub 2020
Mesajlar
682
Tepki puanı
44
Ödüller
6
6 HİZMET YILI
anddd now hes getting ban.. poor on him :thinkie:
 
Im From Indonesia
Seçkin Üye
Katılım
10 Nis 2018
Mesajlar
592
Tepki puanı
13
Ödüller
3
Yaş
33
8 HİZMET YILI
Who getting ban ?
 
ALWAYS REMEMBER
Seçkin Üye
Katılım
30 Mar 2020
Mesajlar
389
Çözümler
1
Tepki puanı
31
Ödüller
4
Yaş
29
6 HİZMET YILI
i dont know bro
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst