Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [grafika] kolory rgb, cos w tym jest...
macza
post
Post #1





Grupa: Zarejestrowani
Postów: 236
Pomógł: 4
Dołączył: 1.05.2006
Skąd: Lublin

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $background = imagecolorallocate($new_img, 255, 255, 255);
  3. imagefill($new_img, 0, 0, $background);
  4. imagecopyresampled($new_img, $img_src, $move_x, $move_y, 0, 0, $new_x, $new_y, $image_x, $image_y);
  5. ?>

mam taki kod i jest tam $background jakie dane podac aby tlo bylo przezroczyste?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
macza
post
Post #2





Grupa: Zarejestrowani
Postów: 236
Pomógł: 4
Dołączył: 1.05.2006
Skąd: Lublin

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $new_img = imagecreatetruecolor($max_x, $max_y);
  3. $background = imagecolorallocatealpha($new_image, 255, 255, 255, 75);
  4. imagefill($new_img, 0, 0, $background);
  5. imagecopyresampled($new_img, $img_src, $move_x, $move_y, 0, 0, $new_x, $new_y, $image_x, $image_y);
  6. ?>

tak zrobilem i daje:
Warning: imagecolorallocatealpha(): supplied argument is not a valid Image resource in C:\WebServ\httpd\skype\!gotowe\admin.php on line 488

488: $background = imagecolorallocatealpha($new_image, 255, 255, 255, 75);
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 5.10.2025 - 15:49