Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Obraz z URL w obrazie PHP
naXe
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 25.11.2013

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


Witam,

Jak mogę wstawić obraz z adresu URL do pliku .php z generowanym obrazem?
Chciałbym dodać, aby wyświetlało obraz z adresu URL w obrazie z pliku PHP.

  1. imagettftext
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
naXe
post
Post #2





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 25.11.2013

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


Mam coś takiego:
  1. $handle = imagecreatefrompng("podpis.png");
  2.  
  3. $text_color = imagecolorallocate($handle, 255, 255, 255);
  4.  
  5. $font = 'arial.ttf';
  6.  
  7. imagettftext($handle, 9, 0, 72, 35, $text_color, $font, "Brak Gracza");
  8. imagettftext($handle, 9, 0, 72, 35, $text_color, $font, $wiersz['members_display_name']);
  9. imagettftext($handle, 9, 0, 72, 58, $text_color, $font, $wiersz['posts']);
  10. imagettftext($handle, 9, 0, 72, 79, $text_color, $font, $wiersz2['field_1']);
  11. imagettftext($handle, 9, 0, 72, 101, $text_color, $font, $wiersz2['field_13']);
  12. imagettftext($handle, 9, 0, 72, 123, $text_color, $font, $new);


I chcę tutaj wyświetlić obraz z URL.

Zrobiłem coś takiego:
  1. imagecopyresampled($handle, imagecreatefrompng("uploads/profile/photo-thumb-".$idkoncowe.".png"), 4, 3, 0, 0, 100, 100, 100, 100);


Czy jest to optymalne rozwiązanie?

Efekt:
(IMG:http://topmasters.pl/podpis-1.png)

Jak jeszcze mogę zrobić skalowanie obrazu gif do 100x100 bez urywania go?

Ten post edytował naXe 25.11.2013, 12:41:32
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: 31.12.2025 - 00:05