Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] problem z atrybutami zdjęcia
Konuss
post
Post #1





Grupa: Zarejestrowani
Postów: 52
Pomógł: 0
Dołączył: 21.07.2005
Skąd: Konin

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


Witam po dodanie przez skrypt zdjęcia na serwer daje mi on atrybu na nim 600 i zdjęcie nie moze byc odczytane przez js Lightboxa podaje kod:

  1. <?php
  2.  
  3. function zdjecia_user($zdjecie, $ogl_id, $i){
  4. //copy ($zdjecie, "o_images/".$ogl_id."_".$i.".jpg");
  5. move_uploaded_file($zdjecie, "o_images/".$ogl_id."_".$i.".jpg");
  6. $source2 = imagecreatefromjpeg("o_images/".$ogl_id."_".$i.".jpg");
  7.  
  8. if(imagesy($source2)>150){
  9. $new_height2 = floor(imagesy($source2)*(150/imagesx($source2)));
  10. $new_width2 = 150;
  11. }
  12. else{
  13. $new_width2 = imagesx($source2);
  14. $new_height2 = imagesy($source2);
  15. }
  16. $dest2 = imagecreatetruecolor($new_width2,$new_height2);
  17. imagecopyresampled($dest2,$source2,0,0,0,0,$new_width2,$new_height2,imagesx($source2),imagesy($source2));
  18. imagejpeg($dest2,"o_images/min_".$ogl_id."_".$i.".jpg",50);
  19. imagedestroy($source2);
  20. imagedestroy($dest2);
  21.  
  22. $source = imagecreatefromjpeg("o_images/".$ogl_id."_".$i.".jpg");
  23.  
  24. if(imagesy($source)>400){
  25. $new_height = 400;
  26. $new_width = floor(imagesx($source)*(400/imagesy($source)));
  27. }
  28. else{
  29. $new_width = imagesx($source);
  30. $new_height = imagesy($source);
  31. }
  32. $dest = imagecreatetruecolor($new_width,$new_height);
  33. imagecopyresampled($dest,$source,0,0,0,0,$new_width,$new_height,imagesx($source),imagesy($source));
  34. imagejpeg($dest,"o_images/".$ogl_id."_".$i.".jpg",50);
  35. imagedestroy($source);
  36. imagedestroy($dest);
  37. }
  38.  
  39. ?>


Prosiłbym o pomoc jak to naprawić sad.gif

Ten post edytował Konuss 2.10.2007, 14:00:07


--------------------
KoNuSS - www.ekonin.net
Go to the top of the page
+Quote Post

Posty w temacie
- Konuss   [php] problem z atrybutami zdjęcia   2.10.2007, 13:19:55
- - mild   Spróbuj z chmod   2.10.2007, 19:28:28
- - Konuss   Zadam głupie pytania a pomógł by m ikto...   2.10.2007, 20:31:56


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

 



RSS Aktualny czas: 21.08.2025 - 10:12