Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Jak zapisać miniaturke JPG?
itsover
post 28.04.2003, 09:38:26
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 1.02.2003

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


oto skrypt który ladnie wyświetla mi miniaturke JPG. Jak zrobic by byla ona zapisaywana na serwerze?? Z góry dziekuje za pomoc
[php:1:fa9d486666]
<?php
$katalog="../flixy";
$nazwa="10";
$width="60";
$height="60";
$obrazek="$katalog/$nazwa.jpg";
$obrazek_min="$katalog/$nazwa_m.jpg";
$obrazek_min=ImageCreate($width, $height);
$obrazek_max=ImageCreateFromJPEG("$obrazek");
$obrazek_max_w=ImageSX($obrazek_max);
$obrazek_max_h=ImageSY($obrazek_max);
ImageCopyResized($obrazek_min1, $obrazek_max, 0, 0, 0, 0, $width, $height, $obrazek_max_w, $obrazek_max_h);
$obrazek=ImageJPEG($obrazek_min);
?>[/php:1:fa9d486666]
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
DeyV
post 28.04.2003, 09:47:50
Post #2





Grupa: Zarząd
Postów: 2 277
Pomógł: 6
Dołączył: 27.12.2002
Skąd: Wołów/Wrocław




Cytat
int imagejpeg ( resource image [, string filename [, int quality]])


imagejpeg() creates the JPEG file in filename from the image image. The image argument is the return from the imagecreate() function.

The filename argument is optional, and if left off, the raw image stream will be output directly. To skip the filename argument in order to provide a quality argument just use an empty string (''). By sending an image/jpeg content-type using header(), you can create a php script that outputs JPEG images directly.

Notatka: JPEG support is only available if php was compiled against GD-1.8 or later.

quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75).

wystarczy :?


--------------------
"Niezależnie od tego, jakie masz osiągnięcia, ktoś Ci pomaga..."
Go to the top of the page
+Quote Post
itsover
post 28.04.2003, 09:57:12
Post #3





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 1.02.2003

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


wystarczylo dziekuje:)
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 05:22