Re: [GD-DEVEL] Warning: imagecopyresampled(): supplied argument is not a valid Image resource
| From: | Pierre Joye | Date: | Thu, 18 Jun 2009 20:32:58 +0000 |
| Subject: | Re: [GD-DEVEL] Warning: imagecopyresampled(): supplied argument is not a valid Image resource | ||
| References: | 1 | Groups: | php.gd.devel |
| Request: | Send a blank email to php-gd-devel+get-570@lists.php.net to get a copy of this message | ||
and how are we supposed to get that works?
The error is clear, you give a non image resource to the function.
either $blank or the $get_images_links array.
On Thu, Jun 18, 2009 at 8:51 PM, Олежкоу DerSizeS<admin@dersizes.ru> wrote:
> php code:
>
> $blank = imagecreatefromjpeg('blank.jpg');
> .....
> $pos_x = 0;
> $pos_y = 0;
> $pos_step = 10;
> while ($get_images_i <= $get_images_n) {
> $ach_ico = imagecreatefromjpeg($get_images_links[1][$get_images_i]);
> imagecopyresampled($blank,$ach_ico,$pos_x,$pos_y,0,0,10,10,64,64);
> $pos_x = $pos_x + $pos_step;
> ImageDestroy($ach_ico);
> $get_images_i++;
>
> }
> .....
> header("Content-type: image/png");
> imagepng($blank);
>
> Problem:
> Warning: imagecopyresampled(): supplied argument is not a valid Image
> resource
>
> Details:
> Apache 2.0.55 (Win32) php 5.2.9.
> The array ($get_images_links) contains more than 50 url's.
>
--
Pierre
http://blog.thepimp.net | http://www.libgd.org