imagesettle() পিএইচপি-তে একটি অন্তর্নির্মিত ফাংশন যা ফিলিং করার জন্য টাইল ইমেজ সেট করতে ব্যবহৃত হয়। এটি একটি বিশেষ রঙ IMG_COLOR_TILED দিয়ে পূরণ করার সময় imagefill() এবং imagefilledpolygon() এর মতো সমস্ত-অঞ্চল ফিলিং ফাংশন দ্বারা ব্যবহার করার জন্য ছবিটি সেট করে৷
আমরা বলতে পারি যে একটি টালি একটি চিত্র যা একটি বারবার প্যাটার্ন দিয়ে একটি এলাকা পূরণ করতে ব্যবহৃত হয়। আমরা যেকোন জিডি ছবিকে টাইল হিসেবে ব্যবহার করতে পারি।
সিনট্যাক্স
bool imagesettile($image, $tile)
পরামিতি
imagesettile() দুটি প্যারামিটার লাগে:$image এবং $টাইল।
-
$ছবি − একটি GD চিত্র ধারণ করে৷
৷ -
$টাইল − $tile প্যারামিটারটি একটি টাইল হিসাবে চিত্র সংস্থান সেট করতে ব্যবহৃত হয়৷
৷
রিটার্ন মান
imagesettile() সাফল্যের উপর সত্য এবং ব্যর্থতার উপর মিথ্যা ফেরত দেয়।
উদাহরণ 1
<?php
// Load the PNG image by using imagecreatefrompng() function.
$image = imagecreatefrompng('C:\xampp\htdocs\Images\img27.png');
// Create an image of 700x300 size
$img = imagecreatetruecolor(700, 300);
// Set the image tile
imagesettile($img, $image);
// Make the image repeat and IMG_COLOR_TILED is used
imagefilledrectangle($img, 0, 0, 300, 199, IMG_COLOR_TILED);
// Output an image to the browser
header('Content-Type: image/png');
imagepng($img);
imagedestroy($img);
imagedestroy($image);
?> ইনপুট ছবি

আউটপুট চিত্র

উদাহরণ 2
<?php
// Load the PNG image by using imagecreatefrompng() function.
$image = imagecreatefrompng('C:\xampp\htdocs\Images\img27.png');
// Create an image of 700x400 size
$img = imagecreatetruecolor(700, 400);
// Set the image tile
imagesettile($img, $image);
// Make the image repeat, IMG_COLOR_TILED is used
imagefilledrectangle($img, 0, 0, 390, 370, IMG_COLOR_TILED);
// Output an image to the browser
header('Content-Type: image/png');
imagepng($img);
imagedestroy($img);
imagedestroy($image);
?> আউটপুট
