কম্পিউটার

PHP-তে imagefill() ফাংশন


ইমেজফিল() ফাংশনটি ইমেজ পূরণ করতে ব্যবহৃত হয়।

সিনট্যাক্স

imagefill(img, x, y, color)

প্যারামিটার

  • img
    imagecreatetruecolor().

    দিয়ে একটি ফাঁকা ছবি তৈরি করুন
  • x
    শুরু বিন্দুর x-সমন্বয়

  • y
    শুরু বিন্দুর y-সমন্বয়

  • রঙ
    ভরাট রঙ।

ফেরত

ইমেজফিল() ফাংশন সফল হলে সত্য বা ব্যর্থ হলে মিথ্যা প্রদান করে।

উদাহরণ

নিম্নলিখিত একটি উদাহরণ:

<?php
   $img = imagecreatetruecolor(400, 400);
   $color = imagecolorallocate($img, 190, 255, 120);
   imagefill($img, 0, 0, $color);
   header('Content-type: image/png');
   imagepng($img);
   imagedestroy($img);
?>

আউটপুট

নিম্নলিখিত আউটপুট:

PHP-তে imagefill() ফাংশন


  1. PHP-তে imagepolygon() ফাংশন

  2. PHP-তে imagecreate() ফাংশন

  3. PHP-তে imagefilledrectangle() ফাংশন

  4. PHP-তে imagefilledellipse() ফাংশন