imagecreatfromstring
PHPで次のようなエラーが発生するという問題があります
警告:
imagecreatefromstring()
: データは /home/ul2in1x1/public_html/ku.php 行 227 の認識された形式ではありません警告: imagecopy() は、パラメーター 2 がリソースであると想定しており、229 行目の /home/ul2in1x1/public_html/ku.php で指定されたブール値です。
何回も何回も
ここに私のコードと$データがあります
function getans($data,$cques)
{
$cque=$cques;
$data = '4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAoAoADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3uiuKh8a6tf6tqdjpfhn7Z/Z87QyP9vSP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WGWSE7onkjDFD6gnp+FPnWnkJ03rbqeM6V5Vz8HdbhOyWe3vUlVDgtECYxuA7ZG8Z/3veurkMDfByU6J5Pm/ZIhcfZgAd+E83dj+LbnOea7iHTLC3M5hsbaM3H+u2RKvm9fvYHPU9fU060sLOwhaKytILaJm3FIYwgJ6ZwO/A/Km6l/vFGk191jyLwzZG4vvD17BqPhu0a2dVaOKZo7mYMQGV1I+Z+oGOOfTFdzdaf8A2z45Vb69sJ7Kwi8yHT0mzKsvy/vJEx0545/u+prbXQNGW5W5XSbATqwdZRbJuDDkEHGc+9WUsLOO9kvUtIFu5F2vOsYEjDjgt1I4H5ClKd3ccadlZliiiiszUKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD';
$data = base64_decode($data);
$width=312;
$height=40;
$offset_x = 276;
$offset_y = 0;
$new_height = 40;
$new_width = 36;
$image = imagecreatefromstring($data);
$new_image = imagecreatetruecolor($new_width, $new_height);
imagecopy($new_image, $image, 0, 0, $offset_x, $offset_y, $width, $height);
imagefilter($new_image, IMG_FILTER_GRAYSCALE);
エラーを解決する方法を教えてください よろしくお願いし
ます